I'm a newcomer to JQuery UI, and I've just spent a bit of time
tracking down a problem we had with Selectable, which I thought might
merit more discussion, as I'm not sure if it could or couldn't be
handled better by Selectable.

The basic symptom was that the lasso ('selection helper') was being
drawn considerably to the right of the cursor, although the actual
effective selection region was clearly correct.  It turned out that
the amount of offset was the same as the amount of automatic left
margin which had been applied to the 'body' element on the page.  This
happened with FF30 and IE8.

Of course, it's pretty simple what was happening - the lasso was being
inserted as a child of 'body', and 'body' was styled 'position:
relative' and Selectable uses clientX,clientY to position the lasso.
But clientX is relative to the window, and positions of absolute
children of 'body' are relative to 'body' (if body is styled
'position: relative')

In our case, we didn't need 'position: relative' on body any more, so
we took it off and everything worked ok, but I couldn't help wondering
if there is an underlying issue here - to take window-relative coords
and apply them to something which is a parent-relative feels wrong.
Like I say, I'm not experienced with JQuery UI, so I don't know if
this is something which is solved elsewhere, or is just something
which is 'our lookout'.

Other minor things:
 - the demo at http://docs.jquery.com/UI/API/1.7/Selectable doesn't
seem to do anything.
- the 'appendTo' option doesn't appear in the documentation.

I'd be happy to help change/fix any of this, if it would be useful.





--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" 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-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to