See the following:
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:
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:
halign:"center",
ALSO:
Using pqgrid.dev.js (with my added code above), line 3399 it reads
hIndx == nullbut should be:
hIndx = null