From 87ab41c80c05a7ef7a66478de041d3ce6863727d Mon Sep 17 00:00:00 2001 From: meinzzzz Date: Tue, 23 Dec 2025 18:02:40 +0100 Subject: [PATCH] Fix shift+tab behavior in MathInputView --- packages/ckeditor5-math/src/ui/mathinputview.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/ckeditor5-math/src/ui/mathinputview.ts b/packages/ckeditor5-math/src/ui/mathinputview.ts index a3b93f3e1..027b7aab9 100644 --- a/packages/ckeditor5-math/src/ui/mathinputview.ts +++ b/packages/ckeditor5-math/src/ui/mathinputview.ts @@ -203,10 +203,14 @@ export default class MathInputView extends View { // Inline shortcut configuration is optional; ignore failures to avoid breaking the math field. } mf.addEventListener( 'keydown', ev => { - if ( ev.key === 'Tab' && !ev.shiftKey ) { - ev.preventDefault(); - ev.stopImmediatePropagation(); - this.latexTextAreaView.focus(); + if ( ev.key === 'Tab' ) { + if ( ev.shiftKey ) { + ev.preventDefault(); + } else { + ev.preventDefault(); + ev.stopImmediatePropagation(); + this.latexTextAreaView.focus(); + } } }, { capture: true } ); mf.addEventListener( 'input', () => {