@samitouri / QOSami-HFS / commits / d476a3e9

fix: taps could be lost on some folders, displaying an unwanted menu-button instead

Massimo Melina committed Sep 6, 2023 at 18:59 UTC d476a3e963f9c74be727601c929877e0d82f7e9c
1 file changed +9 -5
frontend/src/index.scss
+9 -5
@@ -257,8 +257,13 @@ ul.dir {
257 margin-right: 1em;
258 }
259 .link-wrapper {
260 - &:not(:hover) .popup-menu-button { display: none; }
261 - &:hover { padding: 1em; margin: -1em; } // add margin to avoid leaving the hover unintentionally
260 + @media (hover: none) {
261 + .popup-menu-button { display: none }
262 + }
263 + @media (hover: hover) {
264 + &:not(:hover) .popup-menu-button { display: none; }
265 + &:hover { padding: 1em; margin: -1em; } // add margin to avoid leaving the hover unintentionally. Using this on @media(hover:none) will result in some taps to be missed. It happened on a long folder with no spaces in the name to wrap.
266 + }
267 a {
268 &:last-of-type {
269 word-break: break-word;
@@ -429,7 +434,7 @@ button label {
434 .miss-perm { margin: .3em }
435
436 .popup-menu-button {
432 - font-size: .8em; padding: .2em .3em; position: absolute; opacity: .8;
437 + font-size: .8em; padding: .2em .3em; position: absolute; opacity: .8; white-space: nowrap;
438 &:hover { opacity: 1 }
439 }
440
@@ -688,7 +693,6 @@ button label {
693 }
694 }
695
691 -// mobile, landscape or portrait
692 -@media (max-width: 42em), (max-height: 600px) {
696 +@media (pointer: coarse) {
697 #root>.tiles-mode .file-menu-button { font-size: 1em; margin-top: 0.3em; } // easier to tap
698 }