Bug Tracker

Modify

Ticket #12169 (closed bug: invalid)

Opened 10 months ago

Last modified 10 months ago

live event in full screen

Reported by: sfornengo@… Owned by: sfornengo@…
Priority: undecided Milestone: None
Component: unfiled Version: 1.8rc1
Keywords: Cc:
Blocking: Blocked by:

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.

Change History

comment:1 Changed 10 months ago by dmethvin

  • Owner set to sfornengo@…
  • Status changed from new to pending

no longer

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 on document itself.

comment:2 Changed 10 months ago by anonymous

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...

comment:3 Changed 10 months ago by dmethvin

  • Status changed from pending to closed
  • Resolution set to invalid

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.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.