Skip to content

Auto hide isn't working on new searchbar #1171

@117649

Description

@117649

Describe the bug

The new searchbar widget won't be hide when enable autohide nav-bar.

Expected behavior

The searchbar is hide with the toolbar.

Screenshots

No response

OS

Windows 10

OS - Others

No response

Firefox Version

v149+

Distribution

Theme

Theme - More Info

No response

user.js setup

user.js setup
// Your settings

Additional context

The new searchbar widget is a repurposed Url bar element.
So it need special treatment like url bar.

Workaround rule:

/* fix new search widget auto hide */
@media -moz-pref("userChrome.autohide.tabbar") or -moz-pref("userChrome.autohide.navbar") {
  @media -moz-pref("userChrome.autohide.navbar") or -moz-pref("userChrome.tabbar.one_liner") {
    @media (prefers-reduced-motion: no-preference) {
      #nav-bar:not([customizing]) #searchbar-new  {
        transition: opacity var(--uc-autohide-toolbar-speed) var(--animation-easing-function) var(--uc-autohide-toolbar-delay) !important;
      }
      
      #navigator-toolbox:is(:hover, :focus-within) #nav-bar:not([customizing]) #searchbar-new {
        transition-delay: 0s !important;
      }
    }
    
    @media -moz-pref("userChrome.autohide.navbar") {
      @media not -moz-pref("userChrome.tabbar.one_liner") {
        #navigator-toolbox:not(:hover, :focus-within) #nav-bar:not([customizing]) #searchbar-new {
          pointer-events: none;
        }
        
        #nav-bar:not([customizing]) #searchbar-new {
          opacity: 0;
          will-change: margin-bottom, opacity;
        }

        #navigator-toolbox:is(:hover, :focus-within) #nav-bar:not([customizing]) #searchbar-new {
          opacity: 1;
        }
      }
    }
  }
}

@media not -moz-pref("userChrome.urlView.as_commandbar") {
  @media -moz-pref("userChrome.padding.urlbar") {
    :root:not([uidensity="compact"]) #searchbar-new {
      height: calc(var(--urlbar-height) - 2px) !important;
      min-height: calc(var(--urlbar-min-height) - 2px) !important;
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue::BugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions