diff --git a/js/src/dropdown.js b/js/src/dropdown.js index 96094a3e6577..5fd4b0852635 100644 --- a/js/src/dropdown.js +++ b/js/src/dropdown.js @@ -398,12 +398,13 @@ class Dropdown extends BaseComponent { const isInput = /input|textarea/i.test(event.target.tagName) const isEscapeEvent = event.key === ESCAPE_KEY const isUpOrDownEvent = [ARROW_UP_KEY, ARROW_DOWN_KEY].includes(event.key) + const isContentEditable = event.target.closest('[contenteditable]') !== null if (!isUpOrDownEvent && !isEscapeEvent) { return } - if (isInput && !isEscapeEvent) { + if ((isInput || isContentEditable) && !isEscapeEvent) { return }