Author Topic: BUGS 11.1.0 with fixes  (Read 2069 times)

jplevene

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 210
    • View Profile
BUGS 11.1.0 with fixes
« on: January 18, 2026, 01:16:36 am »
See the following:

Code: [Select]
onEditorKeyUp: function(evt, ui) {
var $ed = ui.$editor,
edtype, val = $ed.val(),
i = pq.intel,
pos;
if (val && val.indexOf("=") === 0) {
if (edtype = $ed.is("textarea") ? 1 : $ed.is("div[contenteditable") ? 2 : 0) {
pos = edtype == 2 ? window.getSelection().getRangeAt(0).startOffset : ed.selectionEnd;
i.popup(val, pos, $ed);
this.select(val, pos)
}
}
},

"ed.selectionEnd" should be "$ed.selectionEnd"

ALSO

If you dynamically create an element and make it into a grid inside a hidden block of elements, the grid hasn't rendered, so sizing variables, etc. haven't been defined.  Fixes are:

Code: [Select]
calcTopBottom: function(left) {
if(typeof(this.dims)==="undefined") return 0; // *********** ADD THIS LINE TO TOP
...

getTop: function(ri, actual) {
var top = this.topArr ? this.topArr[ri] : 0,  // *********** CHANGE
...

getLeft: function(_ci, actual) {
if(typeof(this.leftArr)==="undefined") return 0;   // *********** ADD THIS LINE TO TOP
...
getHeightR: function(ri, rows) {
if(typeof(ri)==="undefined" || ri<0) return 0;  // *********** ADD THIS LINE TO TOP
...

Once the grid becomes visible and refreshes, the variables are set.  The above just prevents errors that cause a fatal crash

ALSO:

In columnModel setting halign now doesn't work:
Code: [Select]
halign:"center",
ALSO:

Using pqgrid.dev.js (with my added code above), line 3399 it reads
Code: [Select]
hIndx == nullbut should be:
Code: [Select]
hIndx = null
« Last Edit: January 18, 2026, 07:07:04 am by jplevene »