diff --git a/b2g/chrome/content/forms.js b/b2g/chrome/content/forms.js index b48f24a214e6..56292d98669d 100644 --- a/b2g/chrome/content/forms.js +++ b/b2g/chrome/content/forms.js @@ -235,7 +235,13 @@ let FormAssistant = { this._documentEncoder = null; if (this._editor) { - this._editor.removeEditorObserver(this); + // When the nsIFrame of the input element is reconstructed by + // CSS restyling, the editor observers are removed. Catch + // [nsIEditor.removeEditorObserver] failure exception if that + // happens. + try { + this._editor.removeEditorObserver(this); + } catch (e) {} this._editor = null; }