aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-05-09 10:52:02 +0300
committerAUTOMATIC <16777216c@gmail.com>2023-05-09 10:52:14 +0300
commit11ae5399f667aec3fa00d99a0e5eeeeb3bafeb43 (patch)
tree14a947596637de5ea8abac361ed0a7a5a39b60f0
parentea05ddfec879f31ca2a7e171ed4a00ce6b7eb06b (diff)
make it so that custom context menu from contextMenu.js only disappears after user's click, ignoring non-user click events
-rw-r--r--javascript/contextMenus.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/javascript/contextMenus.js b/javascript/contextMenus.js
index 42f301ab..b2bdf053 100644
--- a/javascript/contextMenus.js
+++ b/javascript/contextMenus.js
@@ -92,8 +92,7 @@ contextMenuInit = function(){
return;
}
gradioApp().addEventListener("click", function(e) {
- let source = e.composedPath()[0]
- if(source.id && source.id.indexOf('check_progress')>-1){
+ if(! e.isTrusted){
return
}