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

Wrong appearance of hovered buttons after last tab (Australis) #138

Closed
Infocatcher opened this issue Apr 9, 2014 · 0 comments
Closed

Wrong appearance of hovered buttons after last tab (Australis) #138

Infocatcher opened this issue Apr 9, 2014 · 0 comments

Comments

@Infocatcher
Copy link
Owner

[Selected tab][Tab         ]|[New Private Tab (hovered)]
Wrong separator ------------^

Screenshot:
Screenshot

Also this separator will be hidden for hovered "New Tab" button.

See view-source:chrome://browser/content/tabbrowser.xml

        <xul:toolbarbutton class="tabs-newtab-button"
                           command="cmd_newNavigatorTab"
                           onclick="checkForMiddleClick(this, event);"
                           onmouseover="document.getBindingParent(this)._enterNewTab();"
                           onmouseout="document.getBindingParent(this)._leaveNewTab();"
                           tooltiptext="&newTabButton.tooltip;"/>
      <method name="_enterNewTab">
        <body><![CDATA[
          let visibleTabs = this.tabbrowser.visibleTabs;
          let candidate = visibleTabs[visibleTabs.length - 1];
          if (!candidate.selected) {
            this._beforeHoveredTab = candidate;
            candidate.setAttribute("beforehovered", "true");
          }
        ]]></body>
      </method>

      <method name="_leaveNewTab">
        <body><![CDATA[
          if (this._beforeHoveredTab) {
            this._beforeHoveredTab.removeAttribute("beforehovered");
            this._beforeHoveredTab = null;
          }
        ]]></body>
      </method>
Infocatcher added a commit that referenced this issue Apr 9, 2014
(for buttons after last tab)
(#138)
Infocatcher added a commit that referenced this issue Apr 9, 2014
Infocatcher added a commit that referenced this issue May 6, 2014
for "beforehovered" attribute on last tab
Note: there also logical bug in old code:
if(btn.id == "tabbrowser-tabs")
(only tabs before buttons)
(#138, also related to #137)
Infocatcher added a commit that referenced this issue May 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant