Bug 676410 - Exception in isKeyboardOpened when called from local page [r=wesj]

This commit is contained in:
Matt Brubeck 2011-08-04 16:23:27 -07:00
Родитель 08d0e6cb20
Коммит 47501027cd
1 изменённых файлов: 3 добавлений и 1 удалений

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

@ -183,7 +183,9 @@ let Util = {
},
get isKeyboardOpened() {
let isChromeWindow = this.isParentProcess() && window["ViewableAreaObserver"];
// This might get called from the child process, or from a frame script in the
// parent process (which does not have access to the main "window" global).
let isChromeWindow = this.isParentProcess() && typeof window == "object" && window["ViewableAreaObserver"];
if (isChromeWindow)
return ViewableAreaObserver.isKeyboardOpened;