-
Notifications
You must be signed in to change notification settings - Fork 47.5k
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
[react-ui] Add preventDefault+ to Keyboard + update a11y components #16833
Conversation
Details of bundled changes.Comparing: 924a305...4bf5585 react-ui
|
Not really convinced about |
@necolas Simply because it means reworking the core event system to have a way of stopping and starting propagation, which then confuses the action with the web equivalent. We won't actually be stopping native propagation here, but overwhelmingly that's what people thought it was doing when we had the declarative prop internally. TBH I'd rather |
Before we had
Bike-shedding of names aside, people shouldn't expect that calling |
Let's go with |
This PR is a sort of spiritual follow up to #16822. Here are the changes outlined in this PR:
preventDefault
andcontinuePropagation
to the user event. Keyboard still does not propagate to other keyboard responders by default, but provides a method to allow it to continue and extra level. I had to update tests respectfully, as we previous used the return value from the event (which was a bit confusing).preventDefault
any events by default. Instead, the user can optionally control this by callingpreventDefault
like already done on the web. ThePress
responder has been updated to ensure that the same standard behavior exists as before.