From fbec0edf08ce686e1b4c8332fad4481986e2dad5 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Tue, 16 Apr 2019 18:45:04 +0200 Subject: Fix opening/closing gifv sometimes making the timeline scroll --- app/javascript/flavours/glitch/components/modal_root.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/javascript/flavours/glitch/components/modal_root.js') 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; } } -- cgit