This is an automated email from the ASF dual-hosted git repository. michaelsmolina pushed a commit to branch 5.0 in repository https://gitbox.apache.org/repos/asf/superset.git
commit 5620acac61446332ba7dec93021211606fd1ab3b Author: notHuman9504 <[email protected]> AuthorDate: Tue Apr 1 22:53:48 2025 +0530 fix: Clicking in the body of a Markdown component does not put it into edit mode (#32384) (cherry picked from commit 26743dfcee0fa0d5b1f629c24f917e7d7707c40a) --- .../src/dashboard/components/menu/WithPopoverMenu.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/superset-frontend/src/dashboard/components/menu/WithPopoverMenu.tsx b/superset-frontend/src/dashboard/components/menu/WithPopoverMenu.tsx index 0845e2e964..7081445c9d 100644 --- a/superset-frontend/src/dashboard/components/menu/WithPopoverMenu.tsx +++ b/superset-frontend/src/dashboard/components/menu/WithPopoverMenu.tsx @@ -115,10 +115,12 @@ export default class WithPopoverMenu extends PureComponent< onChangeFocus: null, menuItems: [], isFocused: false, - shouldFocus: (event: any, container: ShouldFocusContainer) => - container?.contains(event.target) || - event.target.id === 'menu-item' || - event.target.parentNode?.id === 'menu-item', + shouldFocus: (event: any, container: ShouldFocusContainer) => { + if (container?.contains(event.target)) return true; + if (event.target.id === 'menu-item') return true; + if (event.target.parentNode?.id === 'menu-item') return true; + return false; + }, style: null, }; @@ -156,6 +158,9 @@ export default class WithPopoverMenu extends PureComponent< if (!this.props.editMode) { return; } + + event.stopPropagation(); + const { onChangeFocus, shouldFocus: shouldFocusFunc,
