Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
JS TypeError: Safari and IE11: Escape doesn't move focus back from the toolbar to the block content #6165
When using the keyboard and moving focus from the block content to the toolbar using
This works perfectly on Chrome, Firefox, and Edge. It doesn't work on Safari and IE11.
I've quickly seen there's a check for an actual selection and focus is moved back only if there's a selection. I'd suspect the method to get the selection doesn't work with IE11 (not surprisingly) and Safari.
Tested and confirmed that, when using Safari, pressing Alt+F10 moves focus to the block toolbar and that pressing escape or Alt+F10 again does not return focus to the content area. I also noticed that pressing Tab in Safari returns focus from the block toolbar to content area and that pressing Tab in Firefox moves between different block toolbar options whereas Esc returns the focus to the content area.
Error seen in the Safari browser console after pressing Esc while the toolbar has keyboard focus:
Note: since the script source is a React file this may be an upstream bug in React.