ShyFox icon indicating copy to clipboard operation
ShyFox copied to clipboard

Urlbar can't get input focus

Open Akira-uestc opened this issue 1 year ago • 11 comments

Since commit af36edb, the Ctrl+L shortcut no longer brings the URL bar into input mode unless pressed twice.

Opening a new tab does not automatically focus on the URL bar, and clicking the Web Search on the homepage also fails to allow input.

Akira-uestc avatar Dec 02 '24 15:12 Akira-uestc

I was able to fix the focus problem by changing the opacity instead of visibility on #urlbar. Until an official fix is pushed, edit chrome\ShyFox\shy-navbar.css:

  /* hotfix */
  #urlbar{
-    visibility: collapse;
+    opacity: 0;
  }

...

      /* hotfix */
      #urlbar{
-        visibility: visible !important;
-        transition: visibility 0s linear var(--trans-dur);
+        opacity: 100 !important;
+        transition: all 0s linear var(--trans-dur);
        min-width: var(--urlbar-width) !important;
      }

That's good enough for me, hope it helps someone else in the meantime 😄

Sookhaal avatar Dec 05 '24 09:12 Sookhaal

I was able to fix the focus problem by changing the opacity instead of visibility on #urlbar. Until an official fix is pushed, edit chrome\ShyFox\shy-navbar.css:

  /* hotfix */
  #urlbar{
-    visibility: collapse;
+    opacity: 0;
  }

...

      /* hotfix */
      #urlbar{
-        visibility: visible !important;
-        transition: visibility 0s linear var(--trans-dur);
+        opacity: 100 !important;
+        transition: all 0s linear var(--trans-dur);
        min-width: var(--urlbar-width) !important;
      }

That's good enough for me, hope it helps someone else in the meantime 😄

This may provide better animation effects for the toggle of the URLbar based on your fix.

@@ -238,6 +238,7 @@ Navigation bar on top of the window
   /* hotfix */
   #urlbar{
       opacity 0;
+      transition: var(--trans-dur);
   }
 
   #urlbar-container::before {
@@ -264,7 +265,6 @@ Navigation bar on top of the window
       /* hotfix */
       #urlbar{
           opacity: 100 !important;
-          transition: all 0s linear var(--trans-dur);
         min-width: var(--urlbar-width) !important;
       }

Akira-uestc avatar Dec 05 '24 10:12 Akira-uestc

@Akira-uestc Awesome, thank you, it is indeed better and it looks like it even fixes #211 I still see a slight flicker on the overall url bar when hovering it back and forth, but it's still way better.

Sookhaal avatar Dec 05 '24 11:12 Sookhaal

Heyyyyy that works (and I felt like an expert coding guy lol)!! Thank you very much!

Halbour avatar Dec 06 '24 08:12 Halbour

created an account just to thank @Sookhaal and @Akira-uestc, tysm

zanebs avatar Dec 08 '24 15:12 zanebs

Here's the file with the applied fixes from @Sookhaal and @Akira-uestc! shy-navbar.zip

Halbour avatar Dec 09 '24 13:12 Halbour

I used fixes from @Akira-uestc and it shows like this image Does this happen to you guys?

xx90three avatar Dec 12 '24 10:12 xx90three

I used fixes from @Akira-uestc and it shows like this image Does this happen to you guys?

Could you try setting the urlbar position to absolute relative to the navbar?

@media screen {
  #urlbar {
    position: absolute !important;
    opacity: 0 !important;
  }
}

Add the code snippet above to your shy-navbar.css. This prevents my urlbar from sticking to the upper-left corner when refreshing the tab and I haven’t encountered the issue you described when inputting.

EDIT: I managed to reproduce your problem by pressing the refresh button while the navbar is focused and confirmed the following fix resolves the issue instead of the code snippet above:

@@ -238,6 +238,7 @@ Navigation bar on top of the window
   /* hotfix */
   #urlbar{
       opacity 0;
+      position: fixed !important;
       /* transition: var(--trans-dur); */
       transition: var(--transition);
   }

Akira-uestc avatar Dec 12 '24 11:12 Akira-uestc

@@ -238,6 +238,7 @@ Navigation bar on top of the window
   /* hotfix */
   #urlbar{
       opacity 0;
+      position: fixed !important;
       /* transition: var(--trans-dur); */
       transition: var(--transition);
   }

@Akira-uestc THANK YOU!!!! that definitely fixed the problem for me.

xx90three avatar Dec 12 '24 21:12 xx90three

@Akira-uestc i love you, please marry me

wiyrim avatar Dec 14 '24 01:12 wiyrim

@Akira-uestc btw now that i notice that you have akira's pfp. i loved yosuga no sora. such a good anime. the ost is sooo good

wiyrim avatar Dec 14 '24 01:12 wiyrim