FIX: Prevent Safari from scrolling when closing composer
Unlike other browsers, Safari maintains focus on elements even when they are hidden. And since the composer is fixed-positioned when hidden, closing the composer on a topic with several replies causes Safari to scroll the window up. Deliberately blurring the focused element fixes the issue.
This commit is contained in:
parent
732776e2ce
commit
ad7c964cd1
|
@ -1162,6 +1162,7 @@ export default Controller.extend({
|
||||||
const elem = document.querySelector("html");
|
const elem = document.querySelector("html");
|
||||||
elem.classList.remove("fullscreen-composer");
|
elem.classList.remove("fullscreen-composer");
|
||||||
|
|
||||||
|
document.activeElement.blur();
|
||||||
this.setProperties({ model: null, lastValidatedAt: null });
|
this.setProperties({ model: null, lastValidatedAt: null });
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue