Greetings, fellow developers! First of all, I would like to thank you guys for putting in so much time and effort on this amazing framework. This will be basically a repost of another email I sent to jquery ui, along with a ticket filled on their bug tracking system, regarding to the behaviour of one of the widgets in the presence of a positioned body element.
I filled Ticket #4438 <http://dev.jqueryui.com/ticket/4438>, about a bug in the position of the helper in the ui.selectable component, when body has position: relative and an offset relative to the document (margin, padding, etc.) Also, I mentioned that the same problem affects ui.dialog too, in the same conditions, and probably is present other places in the framework. When body has position: relative, the assumption that the origin point (0,0) of the body is the same of the document is not valid when body is offset by a margin or its parent offset it with padding. Attached to the ticket there is a test case for the bug and some insight about the solution. In the jquery-ui-dev thread, I was informed that this is a deliberated shortcoming, and that "jQuery doesn't support dimensions-related methods when the body is positioned". Is that so? The main problems lie in the calculation of the pageX/Y and its use to position elements relative to the body, whose left/top is assumed to be at (0,0) in the viewport but may not be (as it is shown in the testcase), but may be at [document.body.getClientRects()[0].left - (document.documentElement.scrollLeft || document.body.scrollLeft), document.body.getClientRects()[0].top - (document.documentElement.scrollTop || document.body.scrollTop)], assuming that document.body.getClientRects() works as it should (not on webkit based browsers, though). Is there a chance of this being considered for fix, in the long run? It is more a corner case, I know, most people use a wrapping div, but it would be elegant if it worked without one too. Best regards --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---
