ポップアップの幅と高さをクリアするように(ツールチップ等の大きさが意図せず固定されてしまう問題への対処)

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@6657 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2010-05-03 12:36:46 +00:00
parent 7ae995270d
commit 800ceed58c

View File

@ -12,7 +12,7 @@
http://www.cozmixng.org/repos/piro/fx3-compatibility-lib/trunk/stopRendering.js
*/
(function() {
const currentRevision = 4;
const currentRevision = 5;
if (!('piro.sakura.ne.jp' in window)) window['piro.sakura.ne.jp'] = {};
@ -62,8 +62,17 @@
if (aPopup.state != 'open') return;
var w = aPopup.boxObject.width;
var h = aPopup.boxObject.height;
var hasWidth = aPopup.hasAttribute('width');
var hasHeight = aPopup.hasAttribute('height');
aPopup.sizeTo(w, h-1);
aPopup.sizeTo(w, h);
if (!hasWidth || !hasHeight)
window.setTimeout(function() {
if (!hasWidth)
aPopup.removeAttribute('width');
if (!hasHeight)
aPopup.removeAttribute('height');
}, 0);
}, this);
},