Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Urlbar can't get input focus #213

Open
Akira-uestc opened this issue Dec 2, 2024 · 11 comments
Open

Urlbar can't get input focus #213

Akira-uestc opened this issue Dec 2, 2024 · 11 comments

Comments

@Akira-uestc
Copy link

Akira-uestc commented Dec 2, 2024

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.

@Sookhaal
Copy link

Sookhaal commented Dec 5, 2024

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 😄

@Akira-uestc
Copy link
Author

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;
       }

@Sookhaal
Copy link

Sookhaal commented Dec 5, 2024

@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.

@Halbour
Copy link

Halbour commented Dec 6, 2024

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

@zanebs
Copy link

zanebs commented Dec 8, 2024

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

@Halbour
Copy link

Halbour commented Dec 9, 2024

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

@xx90three
Copy link

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

@Akira-uestc
Copy link
Author

Akira-uestc commented Dec 12, 2024

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);
   }

@xx90three
Copy link

@@ -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.

@wiyrim
Copy link

wiyrim commented Dec 14, 2024

@Akira-uestc i love you, please marry me

@wiyrim
Copy link

wiyrim commented Dec 14, 2024

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants