From 966ef984e3415c241bf2c4dd858f2e3a9f42c880 Mon Sep 17 00:00:00 2001 From: Mark Capella Date: Wed, 4 Feb 2015 21:31:04 -0500 Subject: [PATCH] Bug 1125516 - Ensure Selection closed at start of attachCaret, r=wesj --- mobile/android/chrome/content/SelectionHandler.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mobile/android/chrome/content/SelectionHandler.js b/mobile/android/chrome/content/SelectionHandler.js index c3726ffa438a..dba95d3b7c5f 100644 --- a/mobile/android/chrome/content/SelectionHandler.js +++ b/mobile/android/chrome/content/SelectionHandler.js @@ -753,6 +753,9 @@ var SelectionHandler = { * @param aX, aY tap location in client coordinates. */ attachCaret: function sh_attachCaret(aElement) { + // Clear out any existing active selection + this._closeSelection(); + // Ensure it isn't disabled, isn't handled by Android native dialog, and is editable text element if (aElement.disabled || InputWidgetHelper.hasInputWidget(aElement) || !this.isElementEditableText(aElement)) { return this.ATTACH_ERROR_INCOMPATIBLE;