tonytomov / jqGrid

jQuery grid plugin
www.trirand.com
2.84k stars 1.2k forks source link

Problem with Column Menu Position Calculation #951

Closed unle70 closed 4 years ago

unle70 commented 4 years ago

Hello,

I have found a problem with the position of the column menu (left distance) when using a grid with shrinkToFit=false and when a horizontal scroll-bar is used.

When the horizontal scroll-bar is shifted right (changed from the initial position), the positioning of the Column Menus is incorrect and sometimes is even completely out of the visible area.

I'm testing on version 5.4.0, compiled on 2019-09-16.

Thank you, Udi

tonytomov commented 4 years ago

Hello,

I can not reproduce the problem. Can you please prepare a demo or make a link in order to investigate the problem. By the way which CSS framework is used? - jQuery UI, Bottstrap3 or Bootstrap4. By the way do you use the latest CSS files?

unle70 commented 4 years ago

Hi Tony, I'm using jQuery UI. You can see a simple demo here: https://jsfiddle.net/unle70/7es4r6gb/5/

Just move the scroll-bar all the way to the right and then try to click the column-menu icons. You will see the menu opening in the wrong position and sometimes completely off the grid.

tonytomov commented 4 years ago

Thanks for the demo. It show us the right direction. The problem is in jQuery version. In jQuery version < 3. the position function (used to give the coordinates) give different result than the jQuery version 3 and up. You can just try - use jQuery 2.x and you will see that it is working correct. Use the version 3.4 or 3.3 and you will see the problem.

Not sure how to fix it - maybe it is needed to make our on calculation of the position....

tonytomov commented 4 years ago

I have fixed the problem. Please let me know if it fixed for you too.

Regards, Tony

unle70 commented 4 years ago

Hi Tony,

Works perfect now. Thanks.