From 1a3e53b10cfcac926cbdcfa1d3987ddfe626762a Mon Sep 17 00:00:00 2001 From: Paola De Bartolo Date: Mon, 6 Feb 2023 14:16:28 -0300 Subject: [PATCH] fix: avoid hidden buttons on toolbar shortcut binding --- src/vcf-enhanced-rich-text-editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vcf-enhanced-rich-text-editor.js b/src/vcf-enhanced-rich-text-editor.js index d322a56..9ba58e6 100644 --- a/src/vcf-enhanced-rich-text-editor.js +++ b/src/vcf-enhanced-rich-text-editor.js @@ -1942,7 +1942,7 @@ Inline.order.push(PlaceholderBlot.blotName, ReadOnlyBlot.blotName, LinePartBlot. const focusToolbar = () => { this._markToolbarFocused(); - this._toolbar.querySelector('button:not([tabindex])').focus(); + this._toolbar.querySelector('button:not([style*="display: none"]):not([style*="display:none"])').focus(); }; const bindings = keyboard.bindings[key] || [];