Bug 348362 - Don't focus a tab when mousing-down on its close-button. r=mconnor.

This commit is contained in:
mozilla.mano%sent.com 2006-08-12 20:22:39 +00:00
parent e7fa3052a3
commit f61912772f
4 changed files with 12 additions and 3 deletions

View File

@ -2991,7 +2991,7 @@
<xul:label class="tab-text" xbl:inherits="value=label,accesskey,crop,disabled" flex="1"/>
</xul:hbox>
<xul:image anonid="close-button-placeholder" class="tab-close-button-placeholder"/>
<xul:toolbarbutton anonid="close-button" class="tab-close-button"/>
<xul:toolbarbutton anonid="close-button" tabindex="-1" class="tab-close-button"/>
</content>
<implementation>

View File

@ -226,9 +226,11 @@ tabbrowser > tabbox > tabpanels {
background-image: url("chrome://global/skin/activetab-middle.png");
background-repeat: no-repeat;
background-position: 5px 0px;
/* Make this button focusable so clicking on it will not focus the tab while
it's getting closed */
-moz-user-focus: normal;
}
.tab-close-button-placeholder {
list-style-image: url("chrome://global/skin/icons/closetab.png");
opacity: 0.5;

View File

@ -19,7 +19,7 @@
<xul:hbox pack="center" align="center">
<xul:image anonid="close-button-placeholder" class="tab-close-button-placeholder"/>
</xul:hbox>
<xul:toolbarbutton anonid="close-button" class="tab-close-button"/>
<xul:toolbarbutton anonid="close-button" class="tab-close-button" tabindex="-1"/>
<xul:hbox flex="1" class="tab-image-middle" align="center" xbl:inherits="selected">
<xul:stack class="tab-icon">
<xul:image xbl:inherits="validate,src=image" class="tab-icon-image"/>

View File

@ -111,6 +111,13 @@ tab {
margin-top: 0px;
opacity: 1.0;
-moz-image-region: rect(0px, 16px, 16px, 0px);
/* Make this button focusable so clicking on it will not focus the tab while
it's getting closed */
-moz-user-focus: normal;
}
.tab-close-button:focus {
outline: none !important;
}
/**