mirror of
https://github.com/discourse/discourse.git
synced 2025-06-24 03:01:33 +08:00
FIX: ensures focus is dropped before focus hyperlink input (#10653)
This commit is contained in:
@ -27,7 +27,7 @@ export default Controller.extend(ModalFunctionality, {
|
|||||||
.closest(".modal-inner-container")
|
.closest(".modal-inner-container")
|
||||||
.addEventListener("mousedown", this.mouseDown);
|
.addEventListener("mousedown", this.mouseDown);
|
||||||
|
|
||||||
document.querySelector("input.link-url").focus();
|
document.activeElement.blur();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import { next } from "@ember/runloop";
|
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
import { dasherize } from "@ember/string";
|
import { dasherize } from "@ember/string";
|
||||||
import { getOwner } from "discourse-common/lib/get-owner";
|
import { getOwner } from "discourse-common/lib/get-owner";
|
||||||
@ -73,7 +72,7 @@ export default function (name, opts) {
|
|||||||
controller.set("model", model);
|
controller.set("model", model);
|
||||||
}
|
}
|
||||||
if (controller.onShow) {
|
if (controller.onShow) {
|
||||||
next(() => controller.onShow());
|
controller.onShow();
|
||||||
}
|
}
|
||||||
controller.set("flashMessage", null);
|
controller.set("flashMessage", null);
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
placeholderKey="composer.link_url_placeholder"
|
placeholderKey="composer.link_url_placeholder"
|
||||||
class="link-url"
|
class="link-url"
|
||||||
key-up=(action "search")
|
key-up=(action "search")
|
||||||
|
autofocus="autofocus"
|
||||||
}}
|
}}
|
||||||
{{#if searchLoading}}
|
{{#if searchLoading}}
|
||||||
{{loading-spinner}}
|
{{loading-spinner}}
|
||||||
|
Reference in New Issue
Block a user