diff --git a/mobile/android/chrome/content/InputWidgetHelper.js b/mobile/android/chrome/content/InputWidgetHelper.js index 5f140b5e09c7..f52032cae7fc 100644 --- a/mobile/android/chrome/content/InputWidgetHelper.js +++ b/mobile/android/chrome/content/InputWidgetHelper.js @@ -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; diff --git a/mobile/android/chrome/content/browser.js b/mobile/android/chrome/content/browser.js index e97d1c48f607..0a04cf281e2b 100644 --- a/mobile/android/chrome/content/browser.js +++ b/mobile/android/chrome/content/browser.js @@ -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);