diff options
author | ThibG <thib@sitedethib.com> | 2020-07-09 15:09:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-09 15:09:19 +0200 |
commit | 6fda3cbbebfdc7b050f4437b996b2ad36c1db64c (patch) | |
tree | 7a3831f14548361e2515d0e9ced6a3f3b1c812e3 /app/javascript/mastodon/containers/dropdown_menu_container.js | |
parent | 61c07c37317f01c1ab4981826704750fe9937fe7 (diff) |
Freeze scroll position when a dropdown menu is open in the TL (#14271)
* Freeze scroll position when a dropdown menu is open in the TL * Apply this to direct TL as well * Fix case when mouse leaves the menu
Diffstat (limited to 'app/javascript/mastodon/containers/dropdown_menu_container.js')
-rw-r--r-- | app/javascript/mastodon/containers/dropdown_menu_container.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/mastodon/containers/dropdown_menu_container.js b/app/javascript/mastodon/containers/dropdown_menu_container.js index ab1823194..6ec9bbffd 100644 --- a/app/javascript/mastodon/containers/dropdown_menu_container.js +++ b/app/javascript/mastodon/containers/dropdown_menu_container.js @@ -12,7 +12,7 @@ const mapStateToProps = state => ({ openedViaKeyboard: state.getIn(['dropdown_menu', 'keyboard']), }); -const mapDispatchToProps = (dispatch, { status, items }) => ({ +const mapDispatchToProps = (dispatch, { status, items, scrollKey }) => ({ onOpen(id, onItemClick, dropdownPlacement, keyboard) { if (status) { dispatch(fetchRelationships([status.getIn(['account', 'id'])])); @@ -22,7 +22,7 @@ const mapDispatchToProps = (dispatch, { status, items }) => ({ status, actions: items, onClick: onItemClick, - }) : openDropdownMenu(id, dropdownPlacement, keyboard)); + }) : openDropdownMenu(id, dropdownPlacement, keyboard, scrollKey)); }, onClose(id) { |