Index: third_party/WebKit/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js b/third_party/WebKit/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js |
index fd346033580c18eb6a0cd6ded0b9991a8bafb5d2..6385a2a01b5b3fb80f49921824044abd8f649456 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js |
+++ b/third_party/WebKit/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js |
@@ -43,9 +43,9 @@ |
this._watchExpressionsSetting = Common.settings.createLocalSetting('watchExpressions', []); |
this._addButton = new UI.ToolbarButton(Common.UIString('Add expression'), 'largeicon-add'); |
- this._addButton.addEventListener(UI.ToolbarButton.Events.Click, this._addButtonClicked.bind(this)); |
+ this._addButton.addEventListener('click', this._addButtonClicked.bind(this)); |
this._refreshButton = new UI.ToolbarButton(Common.UIString('Refresh'), 'largeicon-refresh'); |
- this._refreshButton.addEventListener(UI.ToolbarButton.Events.Click, this.update, this); |
+ this._refreshButton.addEventListener('click', this._refreshButtonClicked.bind(this)); |
this._bodyElement = this.element.createChild('div', 'vbox watch-expressions'); |
this._bodyElement.addEventListener('contextmenu', this._contextMenu.bind(this), false); |
@@ -82,9 +82,22 @@ |
this._watchExpressionsSetting.set(toSave); |
} |
- _addButtonClicked() { |
+ /** |
+ * @param {!Common.Event=} event |
+ */ |
+ _addButtonClicked(event) { |
+ if (event) |
+ event.consume(true); |
UI.viewManager.showView('sources.watch'); |
this._createWatchExpression(null).startEditing(); |
+ } |
+ |
+ /** |
+ * @param {!Common.Event} event |
+ */ |
+ _refreshButtonClicked(event) { |
+ event.consume(); |
+ this.update(); |
} |
/** |