Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
None
-
None
Description
When a developer tries to analyze the resoures of an app, the inspector fails to open the resources tree as in the image example:
The error message is the following:
ReferenceError: event is not defined
On the return statement of isEventWithinDisclosureTriangle in ResourcesPanel.js (line 833, col 9):
ResourcesPanel.js
isEventWithinDisclosureTriangle: function() { // Override it since we use margin-left in place of treeoutline's text-indent. // Hence we need to take padding into consideration. This all is needed for leading // icons in the tree. var paddingLeft = 14; var left = this.listItemElement.totalOffsetLeft + paddingLeft; return event.pageX >= left && event.pageX <= left + this.arrowToggleWidth && this.hasChildren; }
To fix this I just added event as an argument for that function. So now, the code is the following:
ResourcesPanel.js
isEventWithinDisclosureTriangle: function(event) { // Override it since we use margin-left in place of treeoutline's text-indent. // Hence we need to take padding into consideration. This all is needed for leading // icons in the tree. var paddingLeft = 14; var left = this.listItemElement.totalOffsetLeft + paddingLeft; return event.pageX >= left && event.pageX <= left + this.arrowToggleWidth && this.hasChildren; }
And now it works!