Don't close dialog when dragging outside of it (take 2) #152
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.
@manthey this line was what broke some dialog boxes -
When jQuery's
.off
method only receives one argument, it removes that event listener from the element it is called on and also all of its children. So what was happening was that line was removing theclick
event listeners from the buttons within the dialogs too..off
takes a second argument that lets you specify a specific selector to remove the event listener from. I've done that here -So now it removes the
click
event listener from#g-dialog-container
only, and not any of its children. I tested all of the dialogs I could find in the UI with this change, and it seems to work fine.Fixes #140