-
Notifications
You must be signed in to change notification settings - Fork 909
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix checkbox change event not firing on enter press #12703
Conversation
@@ -48,6 +48,7 @@ export class Checkbox extends Widget { | |||
this.onkeydown(this._el, e => { | |||
if (e.equals(KeyCode.Enter)) { | |||
this.checked = !this.checked; | |||
this._onChange.fire(this.checked); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checkbox should also handle Space key, while you are on this file, do you mind adding space key here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's already handled by the base component. If I'm remembering this correctly the reason we do this stuff here is because we want to purposely stop the propagation so that it doesn't go up and get caught by the wizard page (which would do the "OK" action).
But anyways verified that both enter and space work.
Pull Request Test Coverage Report for Build 283255128
💛 - Coveralls |
* Fix checkbox change event not firing * Add comment
* Fix checkbox change event not firing * Add comment
The key handler was stopping the event from propagating so we never got the onchange event - which was then breaking the model view stuff since the extension side would never get its property value updated.