タブが消えてしまう問題を修正
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@3758 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
42b8258d85
commit
98a6e194e2
@ -1,6 +1,6 @@
|
|||||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||||
@namespace html url("http://www.w3.org/1999/xhtml");
|
@namespace html url("http://www.w3.org/1999/xhtml");
|
||||||
|
|
||||||
tabbrowser[treestyletab-mode="vertical"] .tabs-container > .tabbrowser-arrowscrollbox {
|
tabbrowser .tabs-container > .tabbrowser-arrowscrollbox {
|
||||||
-moz-binding: url("chrome://treestyletab/content/treestyletab.xml#tabbrowser-arrowscrollbox");
|
-moz-binding: url("chrome://treestyletab/content/treestyletab.xml#tabbrowser-arrowscrollbox");
|
||||||
}
|
}
|
||||||
|
@ -16,13 +16,15 @@
|
|||||||
extends="chrome://browser/content/tabbrowser.xml#tabbrowser-arrowscrollbox">
|
extends="chrome://browser/content/tabbrowser.xml#tabbrowser-arrowscrollbox">
|
||||||
<handlers>
|
<handlers>
|
||||||
<handler event="underflow"><![CDATA[
|
<handler event="underflow"><![CDATA[
|
||||||
if (event.detail != 0) return; // Ignore horizontal events
|
|
||||||
var tabs = document.getBindingParent(this);
|
var tabs = document.getBindingParent(this);
|
||||||
|
if ((event.detail == 0) == (tabs.getAttribute('orient') == 'horizontal'))
|
||||||
|
return;
|
||||||
tabs.removeAttribute("overflow");
|
tabs.removeAttribute("overflow");
|
||||||
]]></handler>
|
]]></handler>
|
||||||
<handler event="overflow"><![CDATA[
|
<handler event="overflow"><![CDATA[
|
||||||
if (event.detail != 0) return; // Ignore horizontal events
|
|
||||||
var tabs = document.getBindingParent(this);
|
var tabs = document.getBindingParent(this);
|
||||||
|
if ((event.detail == 0) == (tabs.getAttribute('orient') == 'horizontal'))
|
||||||
|
return;
|
||||||
tabs.setAttribute("overflow", "true");
|
tabs.setAttribute("overflow", "true");
|
||||||
this.scrollBoxObject.ensureElementIsVisible(tabs.selectedItem);
|
this.scrollBoxObject.ensureElementIsVisible(tabs.selectedItem);
|
||||||
]]></handler>
|
]]></handler>
|
||||||
|
@ -123,6 +123,8 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
b.mTabContainer.addEventListener('select', this, true);
|
b.mTabContainer.addEventListener('select', this, true);
|
||||||
b.mTabContainer.addEventListener('scroll', this, true);
|
b.mTabContainer.addEventListener('scroll', this, true);
|
||||||
|
|
||||||
|
var container = document.getAnonymousElementByAttribute(b.mTabContainer, 'class', 'tabs-container');
|
||||||
|
if (container) container.removeAttribute('overflow');
|
||||||
|
|
||||||
/* Closing collapsed last tree breaks selected tab.
|
/* Closing collapsed last tree breaks selected tab.
|
||||||
To solve this problem, I override the setter to
|
To solve this problem, I override the setter to
|
||||||
|
Loading…
x
Reference in New Issue
Block a user