Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(372)

Unified Diff: third_party/WebKit/Source/devtools/front_end/components/EventListenersView.js

Issue 2574603002: DevTools: Fix Elements tab event listener removal (Closed)
Patch Set: address feedback Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/elements/event-listener-sidebar-remove-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/components/EventListenersView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/components/EventListenersView.js b/third_party/WebKit/Source/devtools/front_end/components/EventListenersView.js
index 8f57990943d15f6b358869e5a552a55e21e8b6a8..dd9804b79ed3adfad527ed5893a86e835ee79d5b 100644
--- a/third_party/WebKit/Source/devtools/front_end/components/EventListenersView.js
+++ b/third_party/WebKit/Source/devtools/front_end/components/EventListenersView.js
@@ -326,10 +326,8 @@ Components.ObjectEventListenerBar = class extends TreeElement {
_removeListenerBar() {
var parent = this.parent;
parent.removeChild(this);
- if (!parent.childCount()) {
- parent.parent.removeChild(parent);
- return;
- }
+ if (!parent.childCount())
+ parent.collapse();
var allHidden = true;
for (var i = 0; i < parent.childCount(); ++i) {
if (!parent.childAt(i).hidden)
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/elements/event-listener-sidebar-remove-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698