From b705a901313ec19d06e06c59e6aec0fa226a393d Mon Sep 17 00:00:00 2001 From: piro Date: Thu, 24 Dec 2009 01:09:52 +0000 Subject: [PATCH] =?UTF-8?q?=E3=82=BF=E3=83=96=E3=82=92=E9=96=89=E3=81=98?= =?UTF-8?q?=E3=81=9F=E5=BE=8C=E3=81=AA=E3=81=A9=E3=81=AB=E3=82=AD=E3=83=BC?= =?UTF-8?q?=E3=83=9C=E3=83=BC=E3=83=89=E3=82=B7=E3=83=A7=E3=83=BC=E3=83=88?= =?UTF-8?q?=E3=82=AB=E3=83=83=E3=83=88=E7=AD=89=E3=81=8C=E8=81=9E=E3=81=8B?= =?UTF-8?q?=E3=81=AA=E3=81=8F=E3=81=AA=E3=82=8B=E5=95=8F=E9=A1=8C=E3=81=AB?= =?UTF-8?q?=E3=81=A4=E3=81=84=E3=81=A6=E6=9A=AB=E5=AE=9A=E5=AF=BE=E5=87=A6?= =?UTF-8?q?2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@5593 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/res/stopRendering.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/content/treestyletab/res/stopRendering.js b/content/treestyletab/res/stopRendering.js index 32b58095..1edcc0ae 100644 --- a/content/treestyletab/res/stopRendering.js +++ b/content/treestyletab/res/stopRendering.js @@ -27,6 +27,7 @@ revision : currentRevision, _stopLevel : 0, + _lastFocusedWindow : null, get rootContentViewer() { @@ -38,14 +39,10 @@ .QueryInterface(Components.interfaces.nsIMarkupDocumentViewer); }, - get isActive() - { - return window.top.document.documentElement.getAttribute('active') == 'true'; - }, - stop : function() { if (!this._stopLevel) { + this._lastFocusedWindow = window.top.document.commandDispatcher.focusedWindow; this.rootContentViewer.hide(); } this._stopLevel++; @@ -56,13 +53,10 @@ this._stopLevel--; if (!this._stopLevel) { 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); + if (this._lastFocusedWindow) { + window.top.document.commandDispatcher.focusedWindow = this._lastFocusedWindow; } + this._lastFocusedWindow = null; } }