You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Filip Maj (JIRA)" <ji...@apache.org> on 2013/07/12 21:05:52 UTC
[jira] [Commented] (CB-3786) Event's 'target' and 'currentTarget'
are null for monkeypatched events
[ https://issues.apache.org/jira/browse/CB-3786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13707258#comment-13707258 ]
Filip Maj commented on CB-3786:
-------------------------------
What would be the purpose of the target(s) in cordova-specific events? Is there a {{target}} that would make sense for these events (which inculde more than just backbutton, all of the ones listed here: http://cordova.apache.org/docs/en/2.9.0/cordova_events_events.md.html#Events)
> Event's 'target' and 'currentTarget' are null for monkeypatched events
> ----------------------------------------------------------------------
>
> Key: CB-3786
> URL: https://issues.apache.org/jira/browse/CB-3786
> Project: Apache Cordova
> Issue Type: Bug
> Components: CordovaJS
> Affects Versions: 2.8.0
> Environment: All platforms
> Reporter: Nikolai Kotchetkov
> Assignee: Filip Maj
> Labels: javascript
>
> When subscribing to special Cordova events like 'backbutton', 'target' and 'currentTarget' properties of fired event objects are null.
> {code:javascript}
> document.addEventListener("backbutton", function(e){
> console.log("BACK: " + e.type + " event on " + e.currentTarget + "(" + e.target + ")");
> });
> {code}
> produces result:
> {noformat}
> 06-13 12:35:22.841: I/Web Console(14539): BACK: backbutton event on null(null) at file:///android_asset/www/index.html:71
> {noformat}
> I guess it's not a major problem for everyone but my own library depends on currentTarget property and it may pop somwhere else.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira