From ee771f5bad4005d052e4413e62a37d4bd30e88ed Mon Sep 17 00:00:00 2001 From: Claire Date: Sun, 4 Jun 2023 22:05:45 +0200 Subject: [PATCH] Fix closeModal invocation (#2239) Fixes #2238 Some call sites where missed in 382b2a506a14cef96ed57d4c120b4b9e11eae4b5 --- .../flavours/glitch/containers/dropdown_menu_container.js | 5 ++++- .../glitch/features/compose/containers/dropdown_container.js | 2 +- .../flavours/glitch/features/local_settings/index.jsx | 5 ++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/javascript/flavours/glitch/containers/dropdown_menu_container.js b/app/javascript/flavours/glitch/containers/dropdown_menu_container.js index 36aa4c4ea..da67602b5 100644 --- a/app/javascript/flavours/glitch/containers/dropdown_menu_container.js +++ b/app/javascript/flavours/glitch/containers/dropdown_menu_container.js @@ -24,7 +24,10 @@ const mapDispatchToProps = (dispatch, { status, items, scrollKey }) => ({ }, onClose(id) { - dispatch(closeModal('ACTIONS')); + dispatch(closeModal({ + modalType: 'ACTIONS', + ignoreFocus: false, + })); dispatch(closeDropdownMenu(id)); }, }); diff --git a/app/javascript/flavours/glitch/features/compose/containers/dropdown_container.js b/app/javascript/flavours/glitch/features/compose/containers/dropdown_container.js index 1f39edbff..aa156b8e5 100644 --- a/app/javascript/flavours/glitch/features/compose/containers/dropdown_container.js +++ b/app/javascript/flavours/glitch/features/compose/containers/dropdown_container.js @@ -8,7 +8,7 @@ import Dropdown from '../components/dropdown'; const mapDispatchToProps = dispatch => ({ isUserTouching, onModalOpen: props => dispatch(openModal({ modalType: 'ACTIONS', modalProps: props })), - onModalClose: () => dispatch(closeModal()), + onModalClose: () => dispatch(closeModal({ modalType: undefined, ignoreFocus: false })), }); export default connect(null, mapDispatchToProps)(Dropdown); diff --git a/app/javascript/flavours/glitch/features/local_settings/index.jsx b/app/javascript/flavours/glitch/features/local_settings/index.jsx index f78b8a38e..d4f04c210 100644 --- a/app/javascript/flavours/glitch/features/local_settings/index.jsx +++ b/app/javascript/flavours/glitch/features/local_settings/index.jsx @@ -21,7 +21,10 @@ const mapDispatchToProps = dispatch => ({ dispatch(changeLocalSetting(setting, value)); }, onClose () { - dispatch(closeModal()); + dispatch(closeModal({ + modalType: undefined, + ignoreFocus: false, + })); }, });