mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 13:06:56 +08:00
UX: Show fast edit at top of window on mobile (#21590)
This commit is contained in:
@ -378,11 +378,10 @@ export default Component.extend(KeyEnterEscape, {
|
|||||||
|
|
||||||
schedule("afterRender", () => {
|
schedule("afterRender", () => {
|
||||||
if (this.site.mobileView) {
|
if (this.site.mobileView) {
|
||||||
this.element.style.left = `${
|
this.textRange = document.querySelector("#main-outlet");
|
||||||
(window.innerWidth - this.element.clientWidth) / 2
|
this._popper?.update();
|
||||||
}px`;
|
|
||||||
}
|
}
|
||||||
document.querySelector("#fast-edit-input")?.focus();
|
next(() => document.querySelector("#fast-edit-input")?.focus());
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const postId = this.quoteState.postId;
|
const postId = this.quoteState.postId;
|
||||||
|
Reference in New Issue
Block a user