PDFを開いたタブが選択されている時にドラッグ&ドロップでタブバーを移動できない問題にアドホックな対処
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@5486 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
cf098371a1
commit
9d48654b02
5
content/treestyletab/hide-embed.css
Normal file
5
content/treestyletab/hide-embed.css
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
@namespace url("http://www.w3.org/1999/xhtml");
|
||||||
|
|
||||||
|
body > embed[name="plugin"] {
|
||||||
|
visibility: hidden !important;
|
||||||
|
}
|
@ -1531,6 +1531,7 @@ var TreeStyleTabService = {
|
|||||||
// no feedback image, because it's annoying...
|
// no feedback image, because it's annoying...
|
||||||
dt.setDragImage(new Image(), 0, 0);
|
dt.setDragImage(new Image(), 0, 0);
|
||||||
aEvent.stopPropagation();
|
aEvent.stopPropagation();
|
||||||
|
this.treeStyleTab.tabbarDNDObserver.readyToStartDrag();
|
||||||
}
|
}
|
||||||
else $&]]>
|
else $&]]>
|
||||||
)
|
)
|
||||||
|
@ -21,6 +21,8 @@ TreeStyleTabBrowserTabbarDNDObserver.prototype = {
|
|||||||
sv.kTABBAR_MOVE_NORMAL
|
sv.kTABBAR_MOVE_NORMAL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
this.readyToStartDrag();
|
||||||
|
|
||||||
aEvent.stopPropagation();
|
aEvent.stopPropagation();
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
@ -77,6 +79,32 @@ TreeStyleTabBrowserTabbarDNDObserver.prototype = {
|
|||||||
return canDrag;
|
return canDrag;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
get SSS()
|
||||||
|
{
|
||||||
|
if (this._SSS === void(0)) {
|
||||||
|
if ('@mozilla.org/content/style-sheet-service;1' in Components.classes) {
|
||||||
|
this._SSS = Components.classes['@mozilla.org/content/style-sheet-service;1'].getService(Components.interfaces.nsIStyleSheetService);
|
||||||
|
}
|
||||||
|
if (!this._SSS)
|
||||||
|
this._SSS = null;
|
||||||
|
}
|
||||||
|
return this._SSS;
|
||||||
|
},
|
||||||
|
|
||||||
|
readyToStartDrag : function()
|
||||||
|
{
|
||||||
|
var sheet = this.mOwner.makeURIFromSpec('chrome://treestyletab/content/hide-embed.css');
|
||||||
|
if (!this.SSS.sheetRegistered(sheet, this.SSS.AGENT_SHEET))
|
||||||
|
this.SSS.loadAndRegisterSheet(sheet, this.SSS.AGENT_SHEET);
|
||||||
|
},
|
||||||
|
|
||||||
|
readyToEndDrag : function()
|
||||||
|
{
|
||||||
|
var sheet = this.mOwner.makeURIFromSpec('chrome://treestyletab/content/hide-embed.css');
|
||||||
|
if (this.SSS.sheetRegistered(sheet, this.SSS.AGENT_SHEET))
|
||||||
|
this.SSS.unregisterSheet(sheet, this.SSS.AGENT_SHEET);
|
||||||
|
},
|
||||||
|
|
||||||
onDragEnter : function(aEvent, aDragSession)
|
onDragEnter : function(aEvent, aDragSession)
|
||||||
{
|
{
|
||||||
var sv = this.mOwner;
|
var sv = this.mOwner;
|
||||||
@ -123,10 +151,10 @@ TreeStyleTabBrowserTabbarDNDObserver.prototype = {
|
|||||||
|
|
||||||
onDragEnd : function(aEvent)
|
onDragEnd : function(aEvent)
|
||||||
{
|
{
|
||||||
var sv = this.mOwner;
|
window.setTimeout(function(aSelf) {
|
||||||
window.setTimeout(function() {
|
aSelf.readyToEndDrag();
|
||||||
sv.mTabBrowser.removeAttribute(sv.kDROP_POSITION);
|
aSelf.mOwner.mTabBrowser.removeAttribute(aSelf.mOwner.kDROP_POSITION);
|
||||||
}, 10);
|
}, 10, this);
|
||||||
aEvent.stopPropagation();
|
aEvent.stopPropagation();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user