-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Pressing the Tab
key in restricted editing mode enters a table that's non-editable
#15506
Pressing the Tab
key in restricted editing mode enters a table that's non-editable
#15506
Comments
Rel: #11834. |
…-in-restricted-editing-mode-enters-a-table-thats-non-editable Fix (widget): Native browser `tab` key support should be disabled for cycling nested editable elements inside the editor. Closes #15506.
We have tested the release of V41.3.0 and noticed that there continues to be an issue if there is an editable field inside of a table for a restricted editing document. The user is not able to exit the table and move to the next editable field outside of the table using the tab keys (stuck in an unlimited loop inside of the table). Screen.Recording.2024-04-10.at.2.37.36.PM.mov |
We fixed native focus cycling and missed the custom tab/shift+tab handling. ckeditor5/packages/ckeditor5-restricted-editing/src/restrictededitingmodeediting.ts Lines 113 to 114 in 08270aa
And replace with this: this.listenTo<ViewDocumentTabEvent>( editingView.document, 'tab', ( evt, data ) => {
const commandName = !data.shiftKey ? 'goToNextRestrictedEditingException' : 'goToPreviousRestrictedEditingException';
const command: Command = editor.commands.get( commandName )!;
if ( command.isEnabled ) {
editor.execute( commandName );
// Stop the event in the DOM: no listener in the web page will be triggered by this event.
data.preventDefault();
data.stopPropagation();
}
// Stop the event bubbling in the editor: no more callbacks will be executed for this keystroke.
evt.stop();
}, { context: '$capture' } ); This uses the event bubbling and stops bubbling at the |
📝 Provide detailed reproduction steps (if any)
Tab
key✔️ Expected result
The non-editable table should not be focusable when pressing
Tab
. At the very least, it should be possible to exit the table when pressingTab
again or when pressingShift + Tab
❌ Actual result
Eventually, the caret will enter the table and get stuck there:
restricted-mode-table.mov
📃 Other details
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: