incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Filip Maj (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-633) overriding backbutton is broken when removeEventListener() is called before addEventListener()
Date Thu, 03 May 2012 15:58:54 GMT

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

Filip Maj updated CB-633:
-------------------------

      Component/s:     (was: Android)
                   CordovaJS
    Fix Version/s: 1.8.0

Thanks for bringing this up, cheers! Will fix for 1.8.

I'll add a test to cordova-js to try to formalize the bug.
                
> overriding backbutton is broken when removeEventListener() is called before addEventListener()
> ----------------------------------------------------------------------------------------------
>
>                 Key: CB-633
>                 URL: https://issues.apache.org/jira/browse/CB-633
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: CordovaJS
>    Affects Versions: 1.6.1, 1.7.0
>            Reporter: Hugo
>            Assignee: Filip Maj
>              Labels: android, backbutton
>             Fix For: 1.8.0
>
>
> If document.removeEventListener("backbutton", function(){}, false) is called before the
addEventListener(), the backbutton default behavior isn't overriden.
> To reproduce:
> document.removeEventListener("backbutton", function(){}, false)
> document.addEventListener("backbutton", function(){}, false)
> // ..backbutton default behavior should be overridden (but it's not)
> On the other hand the following will work as expected:
> document.addEventListener("backbutton", function(){}, false)
> // ..ok, backbutton default behavior is overridden
> This is a bigger problem than it looks because developers don't (and shouldn't) keep
track of how many times removeEventListener() was called before calling addEventListener().

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message