キーボードショートカットやコピペができなくなる問題に暫定対処

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@5591 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2009-12-23 16:31:51 +00:00
parent e81324719b
commit 8a67144922

View File

@ -12,7 +12,7 @@
http://www.cozmixng.org/repos/piro/fx3-compatibility-lib/trunk/stopRendering.js http://www.cozmixng.org/repos/piro/fx3-compatibility-lib/trunk/stopRendering.js
*/ */
(function() { (function() {
const currentRevision = 1; const currentRevision = 2;
if (!('piro.sakura.ne.jp' in window)) window['piro.sakura.ne.jp'] = {}; if (!('piro.sakura.ne.jp' in window)) window['piro.sakura.ne.jp'] = {};
@ -30,7 +30,7 @@
get rootContentViewer() get rootContentViewer()
{ {
return window return window.top
.QueryInterface(Components.interfaces.nsIInterfaceRequestor) .QueryInterface(Components.interfaces.nsIInterfaceRequestor)
.getInterface(Components.interfaces.nsIWebNavigation) .getInterface(Components.interfaces.nsIWebNavigation)
.QueryInterface(Components.interfaces.nsIDocShell) .QueryInterface(Components.interfaces.nsIDocShell)
@ -38,18 +38,32 @@
.QueryInterface(Components.interfaces.nsIMarkupDocumentViewer); .QueryInterface(Components.interfaces.nsIMarkupDocumentViewer);
}, },
get isActive()
{
return window.top.document.documentElement.getAttribute('active') == 'true';
},
stop : function() stop : function()
{ {
if (!this._stopLevel) if (!this._stopLevel) {
this.rootContentViewer.hide(); this.rootContentViewer.hide();
}
this._stopLevel++; this._stopLevel++;
}, },
start : function() start : function()
{ {
this._stopLevel--; this._stopLevel--;
if (!this._stopLevel) if (!this._stopLevel) {
this.rootContentViewer.show(); this.rootContentViewer.show();
if (this.isActive && !this.timer) {
this.timer = window.setTimeout(function(aSelf) {
aSelf.timer = null;
window.top.blur();
window.top.focus();
}, 0, this);
}
}
} }
}; };