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

Editor: Resolve macOS Firefox / Safari sibling inserter behavior #11684

Merged
merged 1 commit into from Nov 9, 2018

Conversation

Projects
None yet
3 participants
@aduth
Member

aduth commented Nov 9, 2018

This pull request seeks to resolve an issue where attempting to use the sibling inserter in Firefox or Safari will result in unintended block selection (see example).

The reason for this can be attributed to browser-and-OS-specific handling of click and focus events, specifically affecting Firefox and Safari on macOS.

See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus

The changes here reason this issue by allowing the div wrapper to be focusable (not tabbable), thus receiving the focus event on itself.

Testing instructions:

Verify that the sibling inserter behaves as expected in your preferred browser, and in Firefox and Safari for macOS.

@mcsf

mcsf approved these changes Nov 9, 2018

Thanks for the proper documentation and fix. WFM.

@youknowriad youknowriad merged commit e0305d7 into master Nov 9, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@youknowriad youknowriad deleted the fix/safari-firefox-sibling-inserter branch Nov 9, 2018

grey-rsi pushed a commit to OnTheGoSystems/gutenberg that referenced this pull request Nov 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment