kopia lustrzana https://github.com/wagtail/wagtail
Prevent main menu from re-rendering when clicking outside while the menu is closed (#12755)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>pull/12766/head
rodzic
06ce7d2868
commit
841b36ed18
|
@ -26,6 +26,7 @@ Changelog
|
|||
* Add support for specifying an operator on `Fuzzy` queries (Tom Usher)
|
||||
* Remove support for Safari 15 (Thibaud Colas)
|
||||
* Populate the ImageBlock alt text from the image’s default alt text when selecting a new image (Matt Westcott)
|
||||
* Prevent main menu from re-rendering when clicking outside while the menu is closed (Sage Abdullah)
|
||||
* Fix: Improve handling of translations for bulk page action confirmation messages (Matt Westcott)
|
||||
* Fix: Ensure custom rich text feature icons are correctly handled when provided as a list of SVG paths (Temidayo Azeez, Joel William, LB (Ben) Johnston)
|
||||
* Fix: Ensure manual edits to `StreamField` values do not throw an error (Stefan Hammer)
|
||||
|
|
|
@ -239,7 +239,7 @@ export const Menu: React.FunctionComponent<MenuProps> = ({
|
|||
const sidebar = document.querySelector('[data-wagtail-sidebar]');
|
||||
|
||||
const isInside = sidebar && sidebar.contains(e.target as Node);
|
||||
if (!isInside) {
|
||||
if (!isInside && state.navigationPath !== '') {
|
||||
dispatch({
|
||||
type: 'set-navigation-path',
|
||||
path: '',
|
||||
|
@ -256,7 +256,7 @@ export const Menu: React.FunctionComponent<MenuProps> = ({
|
|||
document.removeEventListener('mousedown', onClickOutside);
|
||||
document.removeEventListener('touchend', onClickOutside);
|
||||
};
|
||||
}, []);
|
||||
}, [state.navigationPath]);
|
||||
|
||||
const onClickAccountSettings = () => {
|
||||
// Pass account expand information to Sidebar component
|
||||
|
|
|
@ -48,6 +48,7 @@ This feature was developed by Jake Howard.
|
|||
* Add support for specifying an operator on `Fuzzy` queries (Tom Usher)
|
||||
* Remove support for Safari 15 (Thibaud Colas)
|
||||
* Populate the ImageBlock alt text from the image’s default alt text when selecting a new image (Matt Westcott)
|
||||
* Prevent main menu from re-rendering when clicking outside while the menu is closed (Sage Abdullah)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue