You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Bruno Pazos (JIRA)" <ji...@apache.org> on 2016/10/07 23:26:20 UTC

[jira] [Updated] (CB-11984) Weinre resources inspector bug in FF 49.0.1

     [ https://issues.apache.org/jira/browse/CB-11984?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bruno Pazos updated CB-11984:
-----------------------------
    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:

!http://imgur.com/PjlMj8R!
[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!
[http://imgur.com/0DHS0OK]



  was:
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!




> 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
>              Labels: easyfix
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> 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!
> [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!
> [http://imgur.com/0DHS0OK]



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org