jQuery UI Widgets › Forums › Grid › Issue with cell mouseover. Wrong cell selected.
This topic contains 5 replies, has 3 voices, and was last updated by Peter Stoev 11 years, 11 months ago.
-
Author
-
Hi,
When i changed the grid selectionmode from row to singlecell (i did this because i was getting an odd behavior), i found that when my mouse is over the grid the selected cell is the one on the left of the mouse and not the cell under it.
My browser is IE 9 and i have the last version of the widget
Can you help me, please?
Thank you in advance.
Ricardo
Hi Ricardo,
Please, post a sample which demonstrates the behavior.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
I can’t show you live, but i sent to the support email an attach with an example.
Regards,
Ricardo
Hi Ricardo,
I would like to ask again for a sample which you can send either here or to support@jqwidgets.com. We are unable to reproduce the behavior you describe.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHello Peter and Ricardo,
While I do not know if this is the exact problem that Ricardo is having, this is what I have noticed. There appears to have been a change in jQuery and how they calculate the mouse position. I noticed that in my own project, the cell under my mouse would only highlight halfway down the cell. I’ve forked another fellows fiddle to demonstrate.
As you can see, within the body tag I’m creating a black boarder at the top of the page. Now move your mouse over the cells. Half way down a cell, it will finally select. If you remove the CSS block and or change the pixel height to 0 the cells select properly.
Likewise, if you keep the css block as is and just change the version of jQuery from 1.9.1 to 1.8.3, then you will notice the cell selection works as desired.
-David
Hi David,
In your fiddle, the BODY has 15px top-border so the Offset will not be correct with 15px. The jQuery’s offset function did not take into account the body’s border. It the jQuery’s Release History of jQuery 1.9, there is a fix about the jQuery’s offset function regarding the Mobile Safari, but there is no mention about the body’s border. However, I verify the problem.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.