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

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

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.8.0
    • Fix Version/s: None
    • Component/s: cordova-js
    • Labels:
    • Environment:

      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

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: