incubator-callback-dev mailing list archives

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

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

Hugo updated CB-633:
--------------------

    Description: 
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().


  was:
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



        Summary: overriding backbutton is broken when removeEventListener() is called before
addEventListener()  (was: overriding backbutton is broekne when removeEventListener() is called
before addEventListener())

Hmmm...was this fixed in 1.7? I found the problem in 1.6.1, but I don't have a 1.7 environment
to test (The release notes in 1.7 make one mention of a back button problem that was fixed,
but the wording isn't specific as to which problem was fixed)
                
> 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: Android
>    Affects Versions: 1.6.1, 1.7.0
>            Reporter: Hugo
>            Assignee: Joe Bowser
>              Labels: android, backbutton
>
> 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