Skip to content
Snippets Groups Projects
Unverified Commit 26743dfc authored by notHuman9504's avatar notHuman9504 Committed by GitHub
Browse files

fix: Clicking in the body of a Markdown component does not put it into edit mode (#32384)

parent 8b0bda3b
Branches
No related tags found
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment