Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-3786

Event's 'target' and 'currentTarget' are null for monkeypatched events

VotersWatch issueWatchersLinkUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • 2.8.0
    • None
    • cordova-js
    • All platforms

    Description

      When subscribing to special Cordova events like 'backbutton', 'target' and 'currentTarget' properties of fired event objects are null.

              document.addEventListener("backbutton", function(e){
                  console.log("BACK: " + e.type + " event on " + e.currentTarget + "(" + e.target + ")");
              });
      

      produces result:

      06-13 12:35:22.841: I/Web Console(14539): BACK: backbutton event on null(null) at file:///android_asset/www/index.html:71
      

      I guess it's not a major problem for everyone but my own library depends on currentTarget property and it may pop somwhere else.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            filmaj Filip Maj
            motorro Nikolai Kotchetkov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment