Browse Source

Fix input focus for schedule media

master
Eduard Kuzmenko 4 years ago
parent
commit
4f752ed76b
  1. 4
      src/components/popups/newMedia.ts

4
src/components/popups/newMedia.ts

@ -126,6 +126,10 @@ export default class PopupNewMedia extends PopupElement { @@ -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);

Loading…
Cancel
Save