make it so that custom context menu from contextMenu.js only disappears after user's click, ignoring non-user click events

This commit is contained in:
AUTOMATIC 2023-05-09 10:52:02 +03:00
parent ea05ddfec8
commit 11ae5399f6

View File

@ -92,8 +92,7 @@ contextMenuInit = function(){
return; return;
} }
gradioApp().addEventListener("click", function(e) { gradioApp().addEventListener("click", function(e) {
let source = e.composedPath()[0] if(! e.isTrusted){
if(source.id && source.id.indexOf('check_progress')>-1){
return return
} }