зеркало из https://github.com/mozilla/pjs.git
Bug 537615: impossible to position cursor in text field (avoid consuming clicks on form elements that are already focused), r=mfinkle/gavin
This commit is contained in:
Родитель
49301ee4c2
Коммит
da4f093e0e
|
@ -1244,6 +1244,10 @@ var FormHelper = {
|
|||
},
|
||||
|
||||
open: function formHelperOpen(aElement) {
|
||||
if (this._open == true && aElement == this._currentElement &&
|
||||
gFocusManager.focusedElement == this._currentElement)
|
||||
return false;
|
||||
|
||||
this._open = true;
|
||||
window.addEventListener("keypress", this, true);
|
||||
let bv = Browser._browserView;
|
||||
|
@ -1254,6 +1258,7 @@ var FormHelper = {
|
|||
|
||||
this._nodes = this._getAll();
|
||||
this.setCurrentElement(aElement.wrappedJSObject || aElement);
|
||||
return true;
|
||||
},
|
||||
|
||||
close: function formHelperHide() {
|
||||
|
|
|
@ -1874,10 +1874,8 @@ ContentCustomClicker.prototype = {
|
|||
if (element instanceof HTMLOptionElement)
|
||||
element = element.parentNode;
|
||||
|
||||
if (FormHelper.canShowUIFor(element)) {
|
||||
FormHelper.open(element);
|
||||
if (FormHelper.canShowUIFor(element) && FormHelper.open(element))
|
||||
return;
|
||||
}
|
||||
|
||||
this._dispatchMouseEvent("mousedown", cX, cY);
|
||||
this._dispatchMouseEvent("mouseup", cX, cY);
|
||||
|
|
Загрузка…
Ссылка в новой задаче