Bruno Pazos created CB-11984:
--------------------------------

             Summary: Weinre resources inspector bug in FF 49.0.1
                 Key: CB-11984
                 URL: https://issues.apache.org/jira/browse/CB-11984
             Project: Apache Cordova
          Issue Type: Bug
          Components: weinre
            Reporter: Bruno Pazos
            Assignee: Patrick Mueller
            Priority: Minor


When a developer tries to analyze the resoures of an app, the inspector fails 
to open the resources tree as in the image example:

!http://imgur.com/PjlMj8R!

The error message is the following:

??ReferenceError: event is not defined??

On the return statement of isEventWithinDisclosureTriangle in ResourcesPanel.js 
(line 833, col 9):

{code:title=ResourcesPanel.js |borderStyle=solid}
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;
    }
{code}

To fix this I just added event as an argument for that function. So now, the 
code is the following:

{code:title=ResourcesPanel.js |borderStyle=solid}
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;
    }
{code}

And now it works!

!http://imgur.com/0DHS0OK!





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to