Bug 1337025 - Add event listener to command event which will be triggered when x button is clicked and repopulate the list. r=jaws
authorSaghan <saghan99@gmail.com>
Thu, 16 Mar 2017 15:58:31 -0700
changeset 396617 ab1bd52909760c469754a3dd60e51e6ae21874dd
parent 396616 1f0db7810a846d8d57add5241dbc3f1c6baa564a
child 396618 8646978d35260c7a796f776d5d03b9d62828bbaf
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1337025
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1337025 - Add event listener to command event which will be triggered when x button is clicked and repopulate the list. r=jaws
toolkit/modules/SelectParentHelper.jsm
--- a/toolkit/modules/SelectParentHelper.jsm
+++ b/toolkit/modules/SelectParentHelper.jsm
@@ -328,16 +328,17 @@ function populateChildren(menulist, opti
       && element.childElementCount > SEARCH_MINIMUM_ELEMENTS) {
 
     // Add a search text field as the first element of the dropdown
     let searchbox = element.ownerDocument.createElement("textbox");
     searchbox.setAttribute("type", "search");
     searchbox.addEventListener("input", onSearchInput);
     searchbox.addEventListener("focus", onSearchFocus);
     searchbox.addEventListener("blur", onSearchBlur);
+    searchbox.addEventListener("command", onSearchInput);
 
     // Handle special keys for exiting search
     searchbox.addEventListener("keydown", function(event) {
       if (event.defaultPrevented) {
         return;
       }
       switch (event.key) {
         case "Escape":