about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-06-10 13:57:13 +0200
committerGitHub <noreply@github.com>2020-06-10 13:57:13 +0200
commitc813789e06e485f8f3d013b55d1d6ecf9a682a02 (patch)
treef6a1381c548a4e2a0d21956cce99e2e735d4a4d1
parentcc6b8a96155a26f3ac0e51f41b1a00bd533fbb76 (diff)
Fix TL sometimes jumping when closing modals (#14019)
Fixes #14018
-rw-r--r--app/javascript/mastodon/components/modal_root.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/mastodon/components/modal_root.js b/app/javascript/mastodon/components/modal_root.js
index fa4e59192..6297b5e29 100644
--- a/app/javascript/mastodon/components/modal_root.js
+++ b/app/javascript/mastodon/components/modal_root.js
@@ -66,7 +66,7 @@ export default class ModalRoot extends React.PureComponent {
       // immediately selectable, we have to wait for observers to run, as
       // described in https://github.com/WICG/inert#performance-and-gotchas
       Promise.resolve().then(() => {
-        this.activeElement.focus();
+        this.activeElement.focus({ preventScroll: true });
         this.activeElement = null;
       }).catch((error) => {
         console.error(error);