From 9a6d3dd5ef920e509247ee192799decdae5767e4 Mon Sep 17 00:00:00 2001 From: Alexandre Poirot Date: Fri, 10 Jul 2015 00:21:00 -0700 Subject: [PATCH] Bug 1171723 - Fix clear button in variable view. r=bgrins --- .../debugger/test/browser_dbg_variables-view-filter-01.js | 1 + .../debugger/test/browser_dbg_variables-view-filter-02.js | 2 ++ browser/devtools/shared/widgets/VariablesView.jsm | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/browser/devtools/debugger/test/browser_dbg_variables-view-filter-01.js b/browser/devtools/debugger/test/browser_dbg_variables-view-filter-01.js index 6aed9a15a686..6c4761449f28 100644 --- a/browser/devtools/debugger/test/browser_dbg_variables-view-filter-01.js +++ b/browser/devtools/debugger/test/browser_dbg_variables-view-filter-01.js @@ -98,6 +98,7 @@ function testVariablesAndPropertiesFiltering() { function firstFilter() { let expanded = once(gVariables, "fetched"); typeText(gSearchBox, "constructor"); + gSearchBox.doCommand(); return expanded.then(testFiltered); } diff --git a/browser/devtools/debugger/test/browser_dbg_variables-view-filter-02.js b/browser/devtools/debugger/test/browser_dbg_variables-view-filter-02.js index 5bb55e1c48b4..4bb08fb9ac27 100644 --- a/browser/devtools/debugger/test/browser_dbg_variables-view-filter-02.js +++ b/browser/devtools/debugger/test/browser_dbg_variables-view-filter-02.js @@ -105,6 +105,7 @@ function testVariablesAndPropertiesFiltering() { function firstFilter() { let expanded = once(gVariables, "fetched"); typeText(gSearchBox, "\"Function\""); + gSearchBox.doCommand(); return expanded.then(testFiltered); } @@ -139,6 +140,7 @@ function testVariablesAndPropertiesFiltering() { backspaceText(gSearchBox, 10); let expanded = once(gVariables, "fetched"); typeText(gSearchBox, "\"Function\""); + gSearchBox.doCommand(); expanded.then(testFiltered); } diff --git a/browser/devtools/shared/widgets/VariablesView.jsm b/browser/devtools/shared/widgets/VariablesView.jsm index 31495ffbe121..61bd4efc6ff5 100644 --- a/browser/devtools/shared/widgets/VariablesView.jsm +++ b/browser/devtools/shared/widgets/VariablesView.jsm @@ -453,7 +453,7 @@ VariablesView.prototype = { searchbox.setAttribute("placeholder", this._searchboxPlaceholder); searchbox.setAttribute("type", "search"); searchbox.setAttribute("flex", "1"); - searchbox.addEventListener("input", this._onSearchboxInput, false); + searchbox.addEventListener("command", this._onSearchboxInput, false); searchbox.addEventListener("keypress", this._onSearchboxKeyPress, false); container.appendChild(searchbox); @@ -470,7 +470,7 @@ VariablesView.prototype = { return; } this._searchboxContainer.remove(); - this._searchboxNode.removeEventListener("input", this._onSearchboxInput, false); + this._searchboxNode.removeEventListener("command", this._onSearchboxInput, false); this._searchboxNode.removeEventListener("keypress", this._onSearchboxKeyPress, false); this._searchboxContainer = null;