This bug is happening only on Free jqGrid 4.9.0 (When I'm switching back to Free-jqGrid 4.8.0 all is working well).
I couldn't recreate it on jFiddle, so it might be due to the fact I have multiple grids on the same page (maybe).
The bug:
The advance search dialog have thier style 'top' and 'left' defaulted to 0px both, so that they apear by default at the upper left of the grid when user click on the search button.
Now, if you close the dialog, and click on the search button again, the 'top' and 'left' are being re-calculated somehow, and the dialog goes up -228.1875px for 'top' and -5px for 'left'. the next time I repeat this flow, the dialog just vanished from the screen (cause it gets -500px or something).
This happens on all my 5 grids. Same behavior. the dialog keeps re-calculate it's position with every re-opening.
I started doing reverse engineering to find out where are those lines in 4.9.0 that cause to this behavior, and found out it's due to the function savePositionOnHide
(line 9896 in jquery.jqgrid.src.js), within the block: this.data(propName, {
if I replace:
top: top, //parseFloat($w.css("top")),
left: left, //parseFloat($w.css("left")),
with
top: getCssStyleOrFloat($w, "top"), //parseFloat($w.css("top")),
left: getCssStyleOrFloat($w, "left"), //parseFloat($w.css("left")),
That I copied from 4.8.0, all is working well.
So I was just wondered, if this indeed a bug, or something else I'm missing.
Thanks,
Thank you for the bug report and the demo which demonstrates the problem! I agree that the code is buggy. I fixed the code of
savePositionOnHide
(see here) fromto the following
and committed the changes to the main code on GitHub. The demo which you posted use the code from GitHub directly and it start work correctly after I committed the fix.