зеркало из https://github.com/mozilla/pjs.git
Bug 539116 - JavaScript error: chrome://browser/content/browser-ui.js, line 1119: aElement is null [r=mfinkle r=stechz]
This commit is contained in:
Родитель
0e0abb1488
Коммит
b815e899bb
|
@ -1283,10 +1283,11 @@ var FormHelper = {
|
|||
},
|
||||
|
||||
handleEvent: function formHelperHandleEvent(aEvent) {
|
||||
let currentElement = this.getCurrentElement();
|
||||
if (aEvent.type != "keypress")
|
||||
let isChromeFocused = gFocusManager.getFocusedElementForWindow(window, false, {}) == gFocusManager.focusedElement;
|
||||
if (isChromeFocused || aEvent.type != "keypress")
|
||||
return;
|
||||
|
||||
let currentElement = this.getCurrentElement();
|
||||
let keyCode = aEvent.keyCode || aEvent.charCode;
|
||||
switch (keyCode) {
|
||||
case aEvent.DOM_VK_DOWN:
|
||||
|
@ -1328,6 +1329,9 @@ var FormHelper = {
|
|||
},
|
||||
|
||||
canShowUIFor: function(aElement) {
|
||||
if (!aElement)
|
||||
return false;
|
||||
|
||||
// Some forms elements are valid in the sense that we want the Form
|
||||
// Assistant to stop on it, but we don't want it to display when
|
||||
// the user clicks on it
|
||||
|
|
Загрузка…
Ссылка в новой задаче