Skip to content
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

Implement event.stopPropagation() when keyboarding declarative properties are set #5822

Closed
harinikmsft opened this issue Aug 24, 2020 · 1 comment · Fixed by #8077
Closed

Comments

@harinikmsft
Copy link
Contributor

To ensure that the JS side matches the native side when declarative properties for handling specific keyboard keys are set, it would be good to implement preventDefault() on the JS side similar to how we marked handled() in the native side.

See comment thread for details.

@ghost ghost added the Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) label Aug 24, 2020
@asklar asklar added help wanted Partner: Facebook and removed Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) labels Aug 24, 2020
@asklar asklar added this to the Backlog milestone Aug 24, 2020
@rectified95
Copy link
Contributor

rectified95 commented Apr 20, 2021

Additional detail from an offline discussion:

The bug is tracking adding some logic to the JS that says when a component gets the keydown event, it should call preventDefault if the component marked keyDownEvents for that key. And it shouldn't call it if the component didn't mark keyDownEvents. That way, the native and JS event propegation are in sync with each other. And in the future we can potentially make the key events happen synchronously and it wont be a behavior change.

Also, this requires calling event.stopPropagation(), rathern than preventDefault() - ref. https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault

@rectified95 rectified95 changed the title Implement preventDefault() when keyboarding declarative properties are set Implement event.stopPropagation() when keyboarding declarative properties are set Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants