Context keep open if changing context, prevents blink and then closure of next context menu
This commit is contained in:
@ -135391,7 +135391,7 @@ var ContextMenu = /*#__PURE__*/function (_React$Component) {
|
||||
menu = _this$props3.menu,
|
||||
hideContextMenu = _this$props3.uiActions.hideContextMenu;
|
||||
|
||||
if (menu && $(e.target).closest('.context-menu').length <= 0 && $(e.target).closest('.context-menu-trigger').length <= 0) {
|
||||
if (menu && $(e.target).closest('.context-menu').length <= 0 && $(e.target).closest('.context-menu-trigger').length <= 0 && !((e.which === 3 || e.button === 2) && ($(e.target).closest('.grid__item').length > 0 || $(e.target).closest('.list__item').length > 0))) {
|
||||
hideContextMenu();
|
||||
}
|
||||
});
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -158,7 +158,18 @@ class ContextMenu extends React.Component {
|
||||
handleMouseDown = (e) => {
|
||||
const { menu, uiActions: { hideContextMenu } } = this.props;
|
||||
|
||||
if (menu && $(e.target).closest('.context-menu').length <= 0 && $(e.target).closest('.context-menu-trigger').length <= 0) {
|
||||
if (
|
||||
menu
|
||||
&& $(e.target).closest('.context-menu').length <= 0
|
||||
&& $(e.target).closest('.context-menu-trigger').length <= 0
|
||||
&& !(
|
||||
(e.which === 3 || e.button === 2) &&
|
||||
(
|
||||
$(e.target).closest('.grid__item').length > 0
|
||||
|| $(e.target).closest('.list__item').length > 0
|
||||
)
|
||||
)
|
||||
) {
|
||||
hideContextMenu();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user