From 4f752ed76bb829101a8ff374f5fdc1b93b81292b Mon Sep 17 00:00:00 2001 From: Eduard Kuzmenko Date: Sun, 9 May 2021 22:51:49 +0400 Subject: [PATCH] Fix input focus for schedule media --- src/components/popups/newMedia.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/popups/newMedia.ts b/src/components/popups/newMedia.ts index 8cc778f0..22bc9574 100644 --- a/src/components/popups/newMedia.ts +++ b/src/components/popups/newMedia.ts @@ -126,6 +126,10 @@ export default class PopupNewMedia extends PopupElement { private onKeyDown = (e: KeyboardEvent) => { const target = e.target as HTMLElement; + if(target.tagName === 'INPUT' || target.hasAttribute('contenteditable')) { + return; + } + if(target !== this.input) { this.input.focus(); placeCaretAtEnd(this.input);