Ver código fonte

Fix file explorer empty-space right-clicks

Adjusts the file explorer detail-view spacing and updates empty-area hit testing so blank space in grouped/grid listings opens the folder context menu instead of the browser menu. The details view now uses a background border to preserve the sticky header gap without clipping rows.
Toby Chui 3 semanas atrás
pai
commit
8e39c73b0c

+ 2 - 6
src/web/SystemAO/file_system/file_explorer.css

@@ -714,7 +714,7 @@ body.fmResizing *{
     flex-grow:1;
     padding-left:2em;
     padding-right:2em;
-    padding-top:2em;
+    padding-top:1.4em;
     overflow-y:auto;
     background-color: var(--folder_view_background);
     scrollbar-width: thin;
@@ -2311,13 +2311,9 @@ i.blue{
 }
 
 /* ---------- Details view: the mockup's columned list ---------- */
-/*
-    No top padding in details view, so the sticky header below can sit flush
-    against the top of the scrollport. With padding here the header pins that
-    far down instead, and scrolled rows stay visible in the band above it.
-*/
 #folderView.fmDetailsView {
     padding-top: 0px;
+    border-top: 10px solid var(--folder_view_background);
 }
 
 #fmListHeader {

+ 2 - 1
src/web/SystemAO/file_system/js/explorer/selection.js

@@ -293,7 +293,8 @@ function bindFileObjectEvents(){
         if (isSpecialViewPath(currentPath)){
             return;
         }
-        if ($(e.target).attr("id") == "folderView" || $(e.target).attr("id") == "fileList" || $(e.target).attr("id") == "folderList" || $(e.target).is("table") || $(e.target).is("th")){
+
+        if ($(e.target).closest(".fileObject").length == 0){
             //Context menu on the empty space of the folder / file list
             e.preventDefault();
             $("#contextmenu").find(".item").hide();