Skip SelectEventPlugin extraction if no listeners#3639
Merged
hellendag merged 1 commit intofacebook:masterfrom Apr 9, 2015
Merged
Skip SelectEventPlugin extraction if no listeners#3639hellendag merged 1 commit intofacebook:masterfrom
hellendag merged 1 commit intofacebook:masterfrom
Conversation
Collaborator
|
Tests are failing: They're also super noisy because of a recent PR – I'll see if we can fix that separately. |
Author
|
Yeah, saw that. I'm fixing now. |
If there are no listeners for `onSelect` yet, do not extract events. This way we can avoid issues where listeners have been set up for some event dependencies for `SelectEventPlugin`, but not all. For instance, if `topMouseDown` has been registered but not `topMouseUp`, event extraction will set the `mouseDown` flag to true but never unset it. This leads to bugs when `onSelect` is registered and should be firing during normal key behavior. Since no `topMouseUp` has yet occurred to unset the flag, `onSelect` fails to fire.
9416869 to
47b147f
Compare
Collaborator
|
lgtm – merge at will. |
hellendag
pushed a commit
that referenced
this pull request
Apr 9, 2015
Skip SelectEventPlugin extraction if no listeners
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.
If there are no listeners for
onSelectyet, do not extract events. This way we can avoid issues where listeners have been set up for some event dependencies forSelectEventPlugin, but not all.For instance, if
topMouseDownhas been registered but nottopMouseUp, event extraction will set themouseDownflag to true but never unset it. This leads to bugs whenonSelectis registered and should be firing during normal key behavior. Since notopMouseUphas yet occurred to unset the flag,onSelectfails to fire.