Bug 1499652 - Pass on return values from forwarded textbox methods. r=Standard8
authorDão Gottwald <dao@mozilla.com>
Wed, 24 Oct 2018 16:51:52 +0000
changeset 491170 74998050fbc4bf8da4dab2626c033cec0b34dbfb
parent 491169 d1052b2d28f6c4239e8870465ccc09ef95f308ac
child 491171 121ccc3d4437ee3a44aa29d4c94feb17073f815c
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersStandard8
bugs1499652
milestone65.0a1
Bug 1499652 - Pass on return values from forwarded textbox methods. r=Standard8 Differential Revision: https://phabricator.services.mozilla.com/D9639
browser/components/urlbar/UrlbarInput.jsm
--- a/browser/components/urlbar/UrlbarInput.jsm
+++ b/browser/components/urlbar/UrlbarInput.jsm
@@ -59,17 +59,17 @@ class UrlbarInput {
       "setAttribute", "hasAttribute", "removeAttribute", "getAttribute",
       "focus", "blur", "select"];
     const READ_ONLY_PROPERTIES = ["inputField", "editor"];
     const READ_WRITE_PROPERTIES = ["placeholder", "readOnly",
       "selectionStart", "selectionEnd"];
 
     for (let method of METHODS) {
       this[method] = (...args) => {
-        this.textbox[method](...args);
+        return this.textbox[method](...args);
       };
     }
 
     for (let property of READ_ONLY_PROPERTIES) {
       Object.defineProperty(this, property, {
         enumerable: true,
         get() {
           return this.textbox[property];