diff options
author | ThibG <thib@sitedethib.com> | 2020-04-28 13:19:39 +0200 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2020-05-03 21:47:11 +0200 |
commit | 7ea8b07b93f7c495ff178f8befc18766499166e5 (patch) | |
tree | 608ec4b76dbcc98f3780f866f1d967661d30960e /app/javascript/flavours/glitch/components | |
parent | 9e5a2168782f24464353e24e497c1f174d9dc1d9 (diff) |
[Glitch] Fix page incorrectly scrolling when bringing up dropdown menus
Port 77ec0875ea998072f4bb709bfb9b15e80669eeef to glitch-soc Signed-off-by: Thibaut Girka <thib@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/components')
-rw-r--r-- | app/javascript/flavours/glitch/components/dropdown_menu.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/components/dropdown_menu.js b/app/javascript/flavours/glitch/components/dropdown_menu.js index b3da4fc2f..60ed859a3 100644 --- a/app/javascript/flavours/glitch/components/dropdown_menu.js +++ b/app/javascript/flavours/glitch/components/dropdown_menu.js @@ -46,7 +46,7 @@ class DropdownMenu extends React.PureComponent { document.addEventListener('keydown', this.handleKeyDown, false); document.addEventListener('touchend', this.handleDocumentClick, listenerOptions); if (this.focusedItem && this.props.openedViaKeyboard) { - this.focusedItem.focus(); + this.focusedItem.focus({ preventScroll: true }); } this.setState({ mounted: true }); } |