Bug 1263460 - Fix UI on Long press of empty Yahoo search field, r=sebastian draft
authorMark Capella <markcapella@twcny.rr.com>
Sun, 10 Apr 2016 15:22:21 -0400
changeset 349255 82c438b2256d4fbc699c475d6b4afe46afd00489
parent 349211 d62963756d9a9d19cbbb5d8f3dd3c7cfa8fdef88
child 518047 796d304546457addb251cc5f6753df6e674b43cf
push id15029
push usermarkcapella@twcny.rr.com
push dateSun, 10 Apr 2016 19:22:38 +0000
reviewerssebastian
bugs1263460
milestone48.0a1
Bug 1263460 - Fix UI on Long press of empty Yahoo search field, r=sebastian MozReview-Commit-ID: IKXthXUihOL
mobile/android/chrome/content/ActionBarHandler.js
--- a/mobile/android/chrome/content/ActionBarHandler.js
+++ b/mobile/android/chrome/content/ActionBarHandler.js
@@ -617,18 +617,18 @@ var ActionBarHandler = {
     // Textarea can contain LF, etc.
     if (this._targetElement instanceof Ci.nsIDOMHTMLTextAreaElement) {
       let flags = Ci.nsIDocumentEncoder.OutputPreformatted |
         Ci.nsIDocumentEncoder.OutputRaw;
       return selection.QueryInterface(Ci.nsISelectionPrivate).
         toStringWithFormat("text/plain", flags, 0);
     }
 
-    // Selection text gets trimmed up.
-    return selection.toString().trim();
+    // Return explicitly selected text.
+    return selection.toString();
   },
 
   /**
    * Provides the nsISelection for either an editor, or from the
    * default window.
    */
   _getSelection: function(element = this._targetElement, win = this._contentWindow) {
     return (element instanceof Ci.nsIDOMNSEditableElement) ?