Ticket #4219: Can't bind events to a table row after it has been made selectable#159
Closed
Prinzhorn wants to merge 1 commit intojquery:masterfrom
Prinzhorn:master
Closed
Ticket #4219: Can't bind events to a table row after it has been made selectable#159Prinzhorn wants to merge 1 commit intojquery:masterfrom Prinzhorn:master
Prinzhorn wants to merge 1 commit intojquery:masterfrom
Prinzhorn:master
Conversation
Fixed #4219 - Can't bind events to a table row after it has been made selectable The lasso is now positioned outside the viewport (not under the mouse) when it's added, since it's size is 0 anyway.
Contributor
|
It seems to me the correct fix is simply for the user to set the distance option to a value other than 0 (the default). With the default distance: 0 the user is communicating to the selectable widget that any mousedown should immediately capture and start selecting. If the user wants to allow a click or dblclick as well, setting the distance to 1 or 2 will allow those while requiring a mousedown+mousemove before the selecting starts. |
thg2k
pushed a commit
to thg2k/jquery-ui
that referenced
this pull request
Oct 18, 2011
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed http://bugs.jqueryui.com/ticket/4219
When the lasso (helper div) was added, it was positioned under the mouse. Since width and height are set to 0, you wouldn't expect any problems, but in fact the helper div prevented click events bound to the selectables from firing.
I moved the helper div to [-1,-1](outside the viewport). This should not affect anything else because the size and coordinates will be refreshed on mouse move, so it doesn't matter where the helper div is right after creation.