about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/components/modal_root.js
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-04-16 18:45:04 +0200
committerThibG <thib@sitedethib.com>2019-04-16 22:20:23 +0200
commitfbec0edf08ce686e1b4c8332fad4481986e2dad5 (patch)
treeed9373c48c45c4108b6d85e9c47d269028c6a1c4 /app/javascript/flavours/glitch/components/modal_root.js
parentf11ad4023c542f0b9012f60c75b0b82d7dc77e93 (diff)
Fix opening/closing gifv sometimes making the timeline scroll
Diffstat (limited to 'app/javascript/flavours/glitch/components/modal_root.js')
-rw-r--r--app/javascript/flavours/glitch/components/modal_root.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/components/modal_root.js b/app/javascript/flavours/glitch/components/modal_root.js
index 7a90e6b8a..4e8648b49 100644
--- a/app/javascript/flavours/glitch/components/modal_root.js
+++ b/app/javascript/flavours/glitch/components/modal_root.js
@@ -40,7 +40,7 @@ export default class ModalRoot extends React.PureComponent {
       this.setState({ revealed: false });
     }
     if (!nextProps.children && !!this.props.children) {
-      this.activeElement.focus();
+      this.activeElement.focus({ preventScroll: true });
       this.activeElement = null;
     }
   }