UX: Show fast edit at top of window on mobile (#21590)

This commit is contained in:
Keegan George
2023-05-17 09:30:29 -07:00
committed by GitHub
parent 082821c754
commit 515529cd34

View File

@ -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;