Bug 654136 - Bixi site causing browser content interactivity issues in Fennec [r=mfinkle]

This commit is contained in:
Vivien Nicolas 2011-05-20 12:18:19 +02:00
Родитель 6a19da366e
Коммит 6ec6428291
2 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

@ -3019,6 +3019,8 @@ var ViewableAreaObserver = {
return (this._height || window.innerHeight);
},
isKeyboardOpened: false,
observe: function va_observe(aSubject, aTopic, aData) {
#if MOZ_PLATFORM_MAEMO == 6
let rect = Rect.fromRect(JSON.parse(aData));
@ -3045,6 +3047,9 @@ var ViewableAreaObserver = {
if (newHeight == oldHeight && newWidth == oldWidth)
return;
// Guess if the window has been resize to handle a virtual keyboard
this.isKeyboardOpened = (newHeight < oldHeight && newWidth == oldWidth);
Browser.styles["viewable-height"].height = newHeight + "px";
Browser.styles["viewable-height"].maxHeight = newHeight + "px";
@ -3076,3 +3081,4 @@ var ViewableAreaObserver = {
}, 0);
}
};

Просмотреть файл

@ -829,6 +829,9 @@ var FormHelperUI = {
break;
case "FormAssist:Resize":
if (!ViewableAreaObserver.isKeyboardOpened)
return;
let element = json.current;
this._zoom(Rect.fromRect(element.rect), Rect.fromRect(element.caretRect));
break;
@ -838,6 +841,9 @@ var FormHelperUI = {
break;
case "FormAssist:Update":
if (!ViewableAreaObserver.isKeyboardOpened)
return;
Browser.hideSidebars();
Browser.hideTitlebar();
this._zoom(null, Rect.fromRect(json.caretRect));