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

Calling document.addEventListener("backbutton") with the same callback function more than once results in never being able to fully remove the listener

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.7.0, 1.8.0
    • 1.8.0
    • cordova-js
    • None

    Description

      I ran into this problem while running mobile spec tests on Android. If I click the Events->Intercept Backbutton link twice then clicking the HW back button results in two console logs saying the back button was intercepted. This is okay. Clicking Events->Stop intercept of back button then clicking the HW back button results in one console log saying the back button was intercepted. This is still good.

      Clicking Events->Stop intercept of back button then clicking the HW back button results in one console log saying the back button was intercepted. This is where things break down. I can click the remove event listener button as many times as I want but it will never be removed.

      Attachments

        Activity

          People

            filmaj Filip Maj
            macdonst Simon MacDonald
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: