Bug 641117 - Autocomplete suggestions could be show on the wrong element [r=mfinkle]

This commit is contained in:
Vivien Nicolas 2011-03-25 10:34:41 +01:00
parent 48ce2bddcb
commit c884928520
2 changed files with 10 additions and 0 deletions

View File

@ -888,6 +888,10 @@ var FormHelperUI = {
let self = this;
window.addEventListener("AnimatedZoomEnd", function() {
window.removeEventListener("AnimatedZoomEnd", arguments.callee, true);
// Ensure the current element has not changed during this interval
if (self._currentElement != aElement)
return;
self._updateSuggestionsFor(aElement);
}, true);
return;
@ -1082,9 +1086,14 @@ var FormHelperUI = {
// the scrollX/scrollY position can change because of the animated zoom so
// delay the caret adjustment
if (AnimatedZoom.isZooming()) {
let currentElement = this._currentElement;
let self = this;
window.addEventListener("AnimatedZoomEnd", function() {
window.removeEventListener("AnimatedZoomEnd", arguments.callee, true);
// Ensure the current element has not changed during this interval
if (self._currentElement != currentElement)
return;
self._ensureCaretVisible(aCaretRect);
}, true);
return;

View File

@ -143,6 +143,7 @@
#form-helper-suggestions {
margin: 0;
color: black;
max-width: 0;
}
#form-helper-suggestions > .autorepeatbutton-down,