Side navigation
#12169 closed bug (invalid)
Opened July 31, 2012 08:21PM UTC
Closed August 01, 2012 04:43PM UTC
live event in full screen
Reported by: | sfornengo@gmail.com | Owned by: | sfornengo@gmail.com |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.8rc1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
live event like:
$(document).on("click",selector,funtion(){alert("coucou");});
no longer fire when toggled in full screen with elem.requestFullScreen()
but classic event like:
$(selector).click(funtion(){alert("coucou");});
works as expected
I can not provide a jsfiddle because it does not support full screen api.
Attachments (0)
Change History (3)
Changed July 31, 2012 09:49PM UTC by comment:1
owner: | → sfornengo@gmail.com |
---|---|
status: | new → pending |
Changed August 01, 2012 11:49AM UTC by comment:2
Sorry for my english (I am French ;)), the no longer isn't justified, this is not a regression in 1.8rc1, 1.7.2 doesn't work too.
here is my test code:
<html> <head> <script src="http://code.jquery.com/jquery-1.8rc1.js"></script> <script> $(document).ready(function(){ $("#gofull").click(function(){ var elem=$("#content")[0]; if(elem.requestFullScreen){ // w3c elem.requestFullScreen(); }else if(elem.webkitRequestFullScreen){ elem.webkitRequestFullScreen(); }else if(elem.mozRequestFullScreen){ elem.mozRequestFullScreen(); }else{ alert("Full screen api unsupported by your browser"); } }); $("#test1").click(function(){ alert("classic test ok"); }); $(document).on("click","#test2",function(){ alert("live test ok"); }); }); </script> </head> <body> <button id="gofull">go full screen</button> <div id="content"> <button id="test1">classic test</button> <button id="test2">live test</button> </div> </body> </html>
only the classic event survive to toggle the div id=content to full screen.
I test under chrome and firefox, the live event doesn't fire in full screen mode.
it doesn't seem to correspond to your suggered bug.
pity that jsfiddle doesn't handle full screen api...
Changed August 01, 2012 04:43PM UTC by comment:3
resolution: | → invalid |
---|---|
status: | pending → closed |
Please ask for help in the forum, since it doesn't look like this is a bug. This would be the expected behavior, for example, if the event is fired directly on document
.
Are you saying this is a regression in jQuery? It is hard to tell since there is no test case. We need a complete test case.
If it "no longer" works, perhaps Firefox changed?
https://bugzilla.mozilla.org/show_bug.cgi?id=703079
Since delegated events are caught for the elements *BELOW* the one where the handler is attached, attaching at
document
would be incorrect if the event is fired ondocument
itself.