-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(core): Fix ContextMenu event of CompressedTreeWidget does not take effect #11230
fix(core): Fix ContextMenu event of CompressedTreeWidget does not take effect #11230
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution 👍
The ECA
check seems to fail since your authorship email and sign-off do not match:
From be62ba392993a0a493de59e025c672125a334132 Mon Sep 17 00:00:00 2001
From: zhaomenghuan02 <zhaomenghuan02@meituan.com>
Date: Tue, 31 May 2022 21:51:29 +0800
Subject: [PATCH] fix(core): Fix ContextMenu event of CompressedTreeWidget does
not take effect
Signed-off-by: zhaomenghuan <1028317108@qq.com>
---
.../browser/tree/tree-compression/compressed-tree-widget.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/packages/core/src/browser/tree/tree-compression/compressed-tree-widget.tsx b/packages/core/src/browser/tree/tree-compression/compressed-tree-widget.tsx
index 609e777404c8..c2f22f3b5ad5 100644
--- a/packages/core/src/browser/tree/tree-compression/compressed-tree-widget.tsx
+++ b/packages/core/src/browser/tree/tree-compression/compressed-tree-widget.tsx
@@ -123,8 +123,8 @@ export class CompressedTreeWidget extends TreeViewWelcomeWidget {
protected getCaptionChildEventHandlers(node: TreeNode, props: CompressedNodeProps): React.Attributes & React.HtmlHTMLAttributes<HTMLElement> {
return {
onClick: event => (event.stopPropagation(), this.handleClickEvent(node, event)),
- onDoubleClick: event => (event.stopPropagation(), this.handleClickEvent(node, event)),
- onContextMenu: event => (event.stopPropagation(), this.handleClickEvent(node, event)),
+ onDoubleClick: event => (event.stopPropagation(), this.handleDblClickEvent(node, event)),
+ onContextMenu: event => (event.stopPropagation(), this.handleContextMenuEvent(node, event)),
};
}
3a032fa
to
f9d0d07
Compare
…e effect Signed-off-by: zhaomenghuan <1028317108@qq.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I confirm that the changes work well, and resolve the issue 👍
The double-click and context-menu events now properly work for compressed file-tree nodes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can also confirm that the changes fix the issue 👍
What it does
Fixes: #10902.
The pull-request fixes the
context-menu
event for theCompressedTreeWidget
.Before fixing:
contextmenu.mov
After fixing:
contexmenu2.mov
How to test
Review checklist
Reminder for reviewers
Signed-off-by: zhaomenghuan 1028317108@qq.com