ポップアップの開閉状態を正しく判定できていなかった

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@7174 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2010-09-10 13:06:43 +00:00
parent 0c4de3d9a6
commit 37317e6885

View File

@ -1832,7 +1832,8 @@ catch(e) {
return;
window.setTimeout(function(aSelf) {
if (!aPopup.boxObject.width && !aPopup.boxObject.height)
if ((!aPopup.boxObject.width && !aPopup.boxObject.height) ||
aPopup.boxObject.popupState == 'closed')
return;
var id = aPopup.id;
@ -1846,7 +1847,7 @@ catch(e) {
onPopupHidden : function TSTService_onPopupHidden(aPopup)
{
var id = aPopup.id;
aPopup = document.getElementById(id) || aPopup;
aPopup = document.getElementById(id) ? id : aPopup ;
var index = TreeStyleTabService._shownPopups.indexOf(aPopup);
if (index > -1)
TreeStyleTabService._shownPopups.splice(index, 1);
@ -1857,7 +1858,7 @@ catch(e) {
TreeStyleTabService._shownPopups = TreeStyleTabService._shownPopups.filter(function(aItem) {
if (typeof aItem == 'string')
aItem = document.getElementById(aItem);
return aItem && aItem.boxObject && aItem.boxObject.width && aItem.boxObject.height;
return aItem && aItem.boxObject && ((!aItem.boxObject.width && !aItem.boxObject.height) || aItem.boxObject.popupState == 'closed');
});
return TreeStyleTabService._shownPopups.length > 0;
},