diff options
author | ThibG <thib@sitedethib.com> | 2020-08-30 18:34:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-30 18:34:51 +0200 |
commit | f715e8b51612820a18fa307e4465eb0c1a088f86 (patch) | |
tree | 8137b48a716e05424ca544210d86e91818085ba7 /app/javascript/flavours/glitch/features/compose/components | |
parent | 30632adf9eda6d83a9b4269f23f11ced5e09cd93 (diff) | |
parent | a68ec50e4e38898e88a7dcc33bd0032adc946dda (diff) |
Merge pull request #1411 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/javascript/flavours/glitch/features/compose/components')
-rw-r--r-- | app/javascript/flavours/glitch/features/compose/components/dropdown.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/features/compose/components/dropdown.js b/app/javascript/flavours/glitch/features/compose/components/dropdown.js index 60035b705..04ef3964b 100644 --- a/app/javascript/flavours/glitch/features/compose/components/dropdown.js +++ b/app/javascript/flavours/glitch/features/compose/components/dropdown.js @@ -57,7 +57,7 @@ export default class ComposerOptionsDropdown extends React.PureComponent { } else { const { top } = target.getBoundingClientRect(); if (this.state.open && this.activeElement) { - this.activeElement.focus(); + this.activeElement.focus({ preventScroll: true }); } this.setState({ placement: top * 2 < innerHeight ? 'bottom' : 'top' }); this.setState({ open: !this.state.open, openedViaKeyboard: type !== 'click' }); @@ -100,7 +100,7 @@ export default class ComposerOptionsDropdown extends React.PureComponent { handleClose = () => { if (this.state.open && this.activeElement) { - this.activeElement.focus(); + this.activeElement.focus({ preventScroll: true }); } this.setState({ open: false }); } |