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

133 url bar is not hide when using autohide nav bar #1028

Open
9 tasks done
117649 opened this issue Nov 26, 2024 · 5 comments
Open
9 tasks done

133 url bar is not hide when using autohide nav bar #1028

117649 opened this issue Nov 26, 2024 · 5 comments
Labels
Browser::Upstream Changes or bugs from Firefox Class::SideEffect Unexpected side effect, undefined behavior Component::Toolbar Toolbar or navbar Env::Windows Issues on Windows10, Windows11, unknown windows Issue::Bug Something isn't working Priority::High Solve and focus on it first

Comments

@117649
Copy link

117649 commented Nov 26, 2024

Describe the bug

image
Its floating over the page.

Expected behavior

It should hide.

Screenshots

image

OS

Windows 10

OS - Others

No response

Firefox Version

133

Distribution

Theme

Theme - More Info

No response

user.js setup

user.js setup
userChrome.autohide.back_button	true	
userChrome.autohide.forward_button	true	
userChrome.autohide.navbar	true	
userChrome.centered.tab.label	true	
userChrome.centered.urlbar	false	
userChrome.compatibility.os	true	
userChrome.compatibility.theme	true	
userChrome.decoration.animate	true	
userChrome.decoration.cursor	true	
userChrome.decoration.download_panel	true	
userChrome.decoration.field_border	true	
userChrome.fullscreen.overlap	true	
userChrome.icon.context_menu	true	
userChrome.icon.global_menu	true	
userChrome.icon.global_menubar	true	
userChrome.icon.library	true	
userChrome.icon.menu	true	
userChrome.icon.menu.full	true	
userChrome.icon.panel	true	
userChrome.icon.panel_full	true	
userChrome.padding.bookmark_menu	true	
userChrome.padding.bookmarkbar	true	
userChrome.padding.global_menubar	true	
userChrome.padding.infobar	true	
userChrome.padding.menu	true	
userChrome.padding.navbar_width	true	
userChrome.padding.panel	true	
userChrome.padding.popup_panel	true	
userChrome.padding.tabbar_height	true	
userChrome.padding.tabbar_width	true	
userChrome.padding.toolbar_button	true	
userChrome.padding.urlbar	true	
userChrome.tab.container	true	
userChrome.tab.crashed	true	
userChrome.tab.dynamic_separtor	true	
userChrome.tab.letters_cleary	true	
userChrome.tab.multi_selected	true	
userChrome.tab.newtab_button_proton	true	
userChrome.tab.pip	true	
userChrome.tab.sound_show_label	true	
userChrome.tab.sound_with_favicons	true	
userChrome.tab.unloaded	true	
userChrome.theme.built_in_contrast	true	
userChrome.theme.fully_color	true	
userChrome.theme.fully_dark	true	
userChrome.theme.proton_chrome	true	
userChrome.theme.proton_color	true	
userChrome.theme.system_default	true	
userChrome.theme.transparent.menu	true	
userChrome.theme.transparent.panel

Additional context

No response

@117649 117649 added the Issue::Bug Something isn't working label Nov 26, 2024
@117649 117649 changed the title url bar is not hide when using autohide toolbar url bar is not hide when using autohide nav bar Nov 27, 2024
@117649
Copy link
Author

117649 commented Nov 27, 2024

@-moz-document url(chrome://browser/content/browser.xhtml) {
@media (-moz-bool-pref: "userChrome.autohide.tabbar") and (-moz-bool-pref: "userChrome.autohide.navbar") and (-moz-bool-pref: "userChrome.autohide.navbar") and (not (-moz-bool-pref: "userChrome.tabbar.one_liner")),
  (-moz-bool-pref: "userChrome.autohide.tabbar") and (-moz-bool-pref: "userChrome.tabbar.one_liner") and (-moz-bool-pref: "userChrome.autohide.navbar") and (not (-moz-bool-pref: "userChrome.tabbar.one_liner")),
  (-moz-bool-pref: "userChrome.autohide.navbar") and (-moz-bool-pref: "userChrome.autohide.navbar") and (-moz-bool-pref: "userChrome.autohide.navbar") and (not (-moz-bool-pref: "userChrome.tabbar.one_liner")),
  (-moz-bool-pref: "userChrome.autohide.navbar") and (-moz-bool-pref: "userChrome.tabbar.one_liner") and (-moz-bool-pref: "userChrome.autohide.navbar") and (not (-moz-bool-pref: "userChrome.tabbar.one_liner")) {
  #nav-bar:not([customizing]) #urlbar {
    margin-bottom: var(--uc-navbar-hide-height);
    opacity: 0;
    will-change: margin-bottom, opacity;
  }
  #navigator-toolbox:is(:hover, :focus-within) #nav-bar:not([customizing]) #urlbar {
    margin-bottom: 0;
    opacity: 1;
  }
}
}

Add this uc style for temp fix.

But this only visually hide the urlbar move cursor over the area of it on page would count as mouse over it and unhide the nav bar.

@117649
Copy link
Author

117649 commented Nov 27, 2024

@-moz-document url(chrome://browser/content/browser.xhtml) {
@media (-moz-bool-pref: "userChrome.autohide.tabbar") and (-moz-bool-pref: "userChrome.autohide.navbar") and (-moz-bool-pref: "userChrome.autohide.navbar") and (not (-moz-bool-pref: "userChrome.tabbar.one_liner")),
  (-moz-bool-pref: "userChrome.autohide.tabbar") and (-moz-bool-pref: "userChrome.tabbar.one_liner") and (-moz-bool-pref: "userChrome.autohide.navbar") and (not (-moz-bool-pref: "userChrome.tabbar.one_liner")),
  (-moz-bool-pref: "userChrome.autohide.navbar") and (-moz-bool-pref: "userChrome.autohide.navbar") and (-moz-bool-pref: "userChrome.autohide.navbar") and (not (-moz-bool-pref: "userChrome.tabbar.one_liner")),
  (-moz-bool-pref: "userChrome.autohide.navbar") and (-moz-bool-pref: "userChrome.tabbar.one_liner") and (-moz-bool-pref: "userChrome.autohide.navbar") and (not (-moz-bool-pref: "userChrome.tabbar.one_liner")) {
  #nav-bar:not([customizing]) #urlbar {
    margin-bottom: var(--uc-navbar-hide-height);
    opacity: 0;
    will-change: margin-bottom, opacity;
    visibility: collapse;
  }
  #navigator-toolbox:is(:hover, :focus-within) #nav-bar:not([customizing]) #urlbar {
    margin-bottom: 0;
    opacity: 1;
    visibility: visible;
  }
}
}

Added visibility setting now mostly working.

@117649 117649 changed the title url bar is not hide when using autohide nav bar 133 url bar is not hide when using autohide nav bar Nov 27, 2024
@black7375 black7375 added Env::Windows Issues on Windows10, Windows11, unknown windows Component::Toolbar Toolbar or navbar Class::SideEffect Unexpected side effect, undefined behavior Browser::Upstream Changes or bugs from Firefox labels Nov 29, 2024
@black7375
Copy link
Owner

I found out the root cause.

It's fine from hbox to html:div, but a problem arises when making the element a popover="manual".
Because it is an overlay, it is maintained even if the parent's position changes, and the top is calculated directly.

mozilla/gecko-dev@eca15e4#diff-0b84874f7ba5c0f2f208772857c2a9da3ae368878358b2c6d3593371b230d0c7R167

-        <hbox id="urlbar" flex="1"
+        <html:div id="urlbar"
+              popover="manual"

This phenomenon also occurs in full screen.
Since fullscreen is commonly used, we will raise this issue to a high priority.

I think we'll have to try your solution temporarily to mitigate the side effects and look into how to fix the problem of it not appearing immediately on hover.

@black7375 black7375 added the Priority::High Solve and focus on it first label Nov 29, 2024
@black7375
Copy link
Owner

If it don't have popover="manual", the following additional CSS will solve the problem.

#urlbar {
  top: 0 !important;
  z-index: 1000 !important;
}

However, we cannot remove HTML Attribute with CSS alone, so we need to find a trick.. 😭

@117649
Copy link
Author

117649 commented Nov 30, 2024

@black7375 The problem of url bar not really hide is still there. Meaning if move cursor over the area of it should be over the page would count as mouse over it and unhide the nav bar.

And I still have to use this:

@-moz-document url(chrome://browser/content/browser.xhtml)
{
  @media (-moz-bool-pref: "userChrome.autohide.tabbar") and (-moz-bool-pref: "userChrome.autohide.navbar") and (-moz-bool-pref: "userChrome.autohide.navbar") and (not (-moz-bool-pref: "userChrome.tabbar.one_liner")),
    (-moz-bool-pref: "userChrome.autohide.tabbar") and (-moz-bool-pref: "userChrome.tabbar.one_liner") and (-moz-bool-pref: "userChrome.autohide.navbar") and (not (-moz-bool-pref: "userChrome.tabbar.one_liner")),
    (-moz-bool-pref: "userChrome.autohide.navbar") and (-moz-bool-pref: "userChrome.autohide.navbar") and (-moz-bool-pref: "userChrome.autohide.navbar") and (not (-moz-bool-pref: "userChrome.tabbar.one_liner")),
    (-moz-bool-pref: "userChrome.autohide.navbar") and (-moz-bool-pref: "userChrome.tabbar.one_liner") and (-moz-bool-pref: "userChrome.autohide.navbar") and (not (-moz-bool-pref: "userChrome.tabbar.one_liner")) {
    #nav-bar:not([customizing]) #urlbar,
    #nav-bar:not([customizing]) toolbarspring {
      visibility: collapse;
/*       animation: delaycollapse 0.6s 6s forwards; */
    }

    #navigator-toolbox:is(:hover, :focus-within) #nav-bar:not([customizing]) #urlbar,
    #navigator-toolbox:is(:hover, :focus-within) #nav-bar:not([customizing]) toolbarspring {
      visibility: visible;
/*       animation-direction: reverse;
      animation-delay: 0s; */
    }
      
    @keyframes delaycollapse {
      from { visibility: visible; }
      to { visibility: collapse; }
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Browser::Upstream Changes or bugs from Firefox Class::SideEffect Unexpected side effect, undefined behavior Component::Toolbar Toolbar or navbar Env::Windows Issues on Windows10, Windows11, unknown windows Issue::Bug Something isn't working Priority::High Solve and focus on it first
Projects
None yet
Development

No branches or pull requests

2 participants