Selaa lähdekoodia

Fixed context menu bug

Toby Chui 2 vuotta sitten
vanhempi
commit
feca393717

+ 1 - 0
web/SystemAO/file_system/file_explorer.css

@@ -1115,6 +1115,7 @@ body.darkTheme .ui.icon.button{
     margin-bottom:0px !important;
     padding:0px !important;
     background-color: var(--upload_bg) !important;
+    overflow-x: hidden;
 }
 
 .statusBar{

+ 6 - 2
web/SystemAO/file_system/file_explorer.html

@@ -1564,7 +1564,11 @@
             var lastClickedFileID = 0;
             function bindFileObjectEvents(){
                 $(".fileObject").off("click").on("click",function(evt){
-                    evt.stopImmediatePropagation();
+                    if (isMobile){
+                        //There are no context menu in mobile
+                        //Stop event propagation to document.click event
+                        evt.stopImmediatePropagation();
+                    }
                     if (renameMode && $(this).find(".renameinput").length == 0){
                         exitRenameModeWithConfirm();
                         return;
@@ -2828,7 +2832,7 @@
                     //Drop the first segment, only keep last one in extreme cases
                     console.log(counter, l);
                     domPathChunks.shift();
-                    fullpath = `<div class="section">...</div>` + domPathChunks.join(`<div class="divider">/</div>`);
+                    fullpath = `<div class="section">...</div><div class="divider">/</div>` + domPathChunks.join(`<div class="divider">/</div>`);
                     $("#pre-render").html(fullpath);
                     pathWidth = $("#pre-render").width();
                     counter++;