Browse Source

Fix TL sometimes jumping when closing modals (#14019)

Fixes #14018
master
ThibG 1 year ago
committed by GitHub
parent
commit
c813789e06
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/javascript/mastodon/components/modal_root.js

+ 1
- 1
app/javascript/mastodon/components/modal_root.js View File

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

Loading…
Cancel
Save