Bug 1263460 - Fix UI on Long press of empty Yahoo search field, r=sebastian
MozReview-Commit-ID: IKXthXUihOL
--- 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) ?