Fix input focus for schedule media

This commit is contained in:
Eduard Kuzmenko 2021-05-09 22:51:49 +04:00
parent 1b88a63f3f
commit 4f752ed76b

View File

@ -126,6 +126,10 @@ export default class PopupNewMedia extends PopupElement {
private onKeyDown = (e: KeyboardEvent) => { private onKeyDown = (e: KeyboardEvent) => {
const target = e.target as HTMLElement; const target = e.target as HTMLElement;
if(target.tagName === 'INPUT' || target.hasAttribute('contenteditable')) {
return;
}
if(target !== this.input) { if(target !== this.input) {
this.input.focus(); this.input.focus();
placeCaretAtEnd(this.input); placeCaretAtEnd(this.input);