FIX: ensures focus is dropped before focus hyperlink input (#10653)

This commit is contained in:
Joffrey JAFFEUX 2020-09-11 16:45:51 +02:00 committed by GitHub
parent 0972994c7e
commit 10bdf36a24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ export default Controller.extend(ModalFunctionality, {
.closest(".modal-inner-container")
.addEventListener("mousedown", this.mouseDown);
document.querySelector("input.link-url").focus();
document.activeElement.blur();
});
},

View File

@ -1,4 +1,3 @@
import { next } from "@ember/runloop";
import I18n from "I18n";
import { dasherize } from "@ember/string";
import { getOwner } from "discourse-common/lib/get-owner";
@ -73,7 +72,7 @@ export default function (name, opts) {
controller.set("model", model);
}
if (controller.onShow) {
next(() => controller.onShow());
controller.onShow();
}
controller.set("flashMessage", null);

View File

@ -6,6 +6,7 @@
placeholderKey="composer.link_url_placeholder"
class="link-url"
key-up=(action "search")
autofocus="autofocus"
}}
{{#if searchLoading}}
{{loading-spinner}}