diff --git a/mobile/android/chrome/content/browser.js b/mobile/android/chrome/content/browser.js index a48bdde2e9c..44e756d4f4c 100644 --- a/mobile/android/chrome/content/browser.js +++ b/mobile/android/chrome/content/browser.js @@ -1248,7 +1248,7 @@ var BrowserApp = { if (aOnlyInputElements) return null; - if (focused instanceof HTMLTextAreaElement || focused.isContentEditable) { + if (focused && (focused instanceof HTMLTextAreaElement || focused.isContentEditable)) { if (focused instanceof HTMLBodyElement) { // we are putting focus into a contentEditable frame. scroll the frame into