Bug 624749 - Select box and form assistant jiggle up and down [r=mfinkle]

This commit is contained in:
Vivien Nicolas 2011-01-18 18:16:01 +01:00
parent 7b0beb7597
commit 9d37dbb768
2 changed files with 7 additions and 4 deletions

View File

@ -1502,12 +1502,15 @@
<method name="contentHasChanged">
<body><![CDATA[
let height = Math.floor(this.getBoundingClientRect().height);
let oldHeight = parseInt(this._spacer.getAttribute("height"));
this.top = window.innerHeight - height;
this._spacer.setAttribute("height", height);
let event = document.createEvent("Events");
event.initEvent("SizeChanged", true, false);
this.dispatchEvent(event);
if (height != oldHeight) {
let event = document.createEvent("Events");
event.initEvent("SizeChanged", true, false);
this.dispatchEvent(event);
}
]]></body>
</method>

View File

@ -680,7 +680,7 @@ var FormHelperUI = {
SelectHelperUI.resize();
self._container.contentHasChanged();
self._zoom(this._currentElementRect, this._currentCaretRect);
self._zoom(self._currentElementRect, self._currentCaretRect);
}, 0, this);
break;
}