[Glitch] Fix scrolling issues when closing some dropdown menus

Port c7cfd4e67a to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
This commit is contained in:
ThibG
2020-08-21 14:14:28 +02:00
committed by Thibaut Girka
parent 8c3c27bf06
commit 45d1f34a30
2 changed files with 3 additions and 3 deletions

View File

@ -205,7 +205,7 @@ export default class Dropdown extends React.PureComponent {
handleClose = () => {
if (this.activeElement) {
this.activeElement.focus();
this.activeElement.focus({ preventScroll: true });
this.activeElement = null;
}
this.props.onClose(this.state.id);