зеркало из https://github.com/mozilla/gecko-dev.git
Bug 928163 - Allow or disallow proper text selection caret display based on HTML <input> type, r=margaret
This commit is contained in:
Родитель
87cdb639f2
Коммит
ffe96c09df
|
@ -13,7 +13,7 @@ var InputWidgetHelper = {
|
|||
handleClick: function(aTarget) {
|
||||
// if we're busy looking at a InputWidget we want to eat any clicks that
|
||||
// come to us, but not to process them
|
||||
if (this._uiBusy || !this._isValidInput(aTarget))
|
||||
if (this._uiBusy || !this.hasInputWidget(aTarget))
|
||||
return;
|
||||
|
||||
this._uiBusy = true;
|
||||
|
@ -60,7 +60,7 @@ var InputWidgetHelper = {
|
|||
}).bind(this));
|
||||
},
|
||||
|
||||
_isValidInput: function(aElement) {
|
||||
hasInputWidget: function(aElement) {
|
||||
if (!aElement instanceof HTMLInputElement)
|
||||
return false;
|
||||
|
||||
|
|
|
@ -4308,8 +4308,9 @@ var BrowserEventHandler = {
|
|||
this._sendMouseEvent("mousedown", element, x, y);
|
||||
this._sendMouseEvent("mouseup", element, x, y);
|
||||
|
||||
// See if its an input element, and it isn't disabled
|
||||
// See if its an input element, and it isn't disabled, nor handled by Android native dialog
|
||||
if (!element.disabled &&
|
||||
!InputWidgetHelper.hasInputWidget(element) &&
|
||||
((element instanceof HTMLInputElement && element.mozIsTextField(false)) ||
|
||||
(element instanceof HTMLTextAreaElement)))
|
||||
SelectionHandler.attachCaret(element);
|
||||
|
|
Загрузка…
Ссылка в новой задаче