Fix for onMenuClick firing on every keyDown#4557
Merged
Markionium merged 4 commits intoApr 16, 2018
Merged
Conversation
manishgarg1
reviewed
Apr 15, 2018
| } | ||
|
|
||
| if (!ev.defaultPrevented && | ||
| this.props.menuTriggerKeyCode !== null && |
Collaborator
There was a problem hiding this comment.
this.props.menuTriggerKeyCode !== null [](start = 6, length = 38)
The "!== null" part is not required
Member
Author
|
@manishgarg1 Lets hold off merging this one until Bryan confirms this is what fixes his issue? :) |
Collaborator
|
@Markionium, absolutely. Please feel free to assign this issue to yourself if you wish to help it to completion. |
brwatt
approved these changes
Apr 16, 2018
brwatt
left a comment
Collaborator
There was a problem hiding this comment.
This does fix my problem. Thank you. I did have a minor concern about the change, but I don't think its blocking issue.
|
|
||
| if (!ev.defaultPrevented && | ||
| this.props.menuTriggerKeyCode !== null && | ||
| this.props.menuTriggerKeyCode && |
Collaborator
There was a problem hiding this comment.
It doesn't seem like you want to check this.props.menuTriggerKeyCode here? It is already being handled in this._isValidMenuOpenKey.
Markionium
force-pushed
the
mapol/fix-onMenuClick-firing-on-every-key-down
branch
from
April 16, 2018 16:43
fd3c98e to
f9b09a9
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Pull request checklist
$ npm run changeDescription of changes
Bryan pointed out to me that i introduced a bug during a previous fix. The
onMenuClickfor a button should only be fired in theonKeyDownhandler when a key that should open the menu is pressed.In the current version it's fired on each
keyPressFocus areas to test
(optional)