Bug 1496152 - Implement UrlbarInput focused getter. r=Standard8
authorDão Gottwald <dao@mozilla.com>
Wed, 03 Oct 2018 20:16:30 +0000
changeset 487864 b37b275c93648fc79fd82633e2db3b969cd14e46
parent 487863 35617edceddab3f598412be21028155ada286e62
child 487865 801d7d6ee6f046561c78710a9fb14af8b5a8bb39
push id246
push userfmarier@mozilla.com
push dateSat, 13 Oct 2018 00:15:40 +0000
reviewersStandard8
bugs1496152
milestone64.0a1
Bug 1496152 - Implement UrlbarInput focused getter. r=Standard8 Differential Revision: https://phabricator.services.mozilla.com/D7630
browser/components/urlbar/UrlbarInput.jsm
--- a/browser/components/urlbar/UrlbarInput.jsm
+++ b/browser/components/urlbar/UrlbarInput.jsm
@@ -173,16 +173,20 @@ class UrlbarInput {
       this[methodName](event);
     } else {
       throw "Unrecognized urlbar event: " + event.type;
     }
   }
 
   // Getters and Setters below.
 
+  _get_focused() {
+    return this.inputField.getAttribute("focused") == "true";
+  }
+
   _set_value(val) {
     val = this.trimValue(val);
 
     this.valueIsTyped = false;
     this.inputField.value = val;
 
     return val;
   }