Şu anda bakım nedeniyle sitemiz kısıtlı işlevsellik sunmaktadır. Mevcut makaleler sorununuzu çözmediyse ve bize soru sormak isterseniz Twitter’da @FirefoxSupport hesabından ve Reddit’teki /r/firefox subreddit'inden destek gönüllülerimize ulaşabilirsiniz.

Mozilla Destek’te Ara

Destek dolandırıcılığından kaçının. Mozilla sizden asla bir telefon numarasını aramanızı, mesaj göndermenizi veya kişisel bilgilerinizi paylaşmanızı istemez. Şüpheli durumları “Kötüye kullanım bildir” seçeneğini kullanarak bildirebilirsiniz.

Daha Fazlasını Öğren

"ESC" event keycode not detected in document.keydown listener while exiting fullscreen mode

  • 1 yanıt
  • 9 kişi bu sorunu yaşıyor
  • 1 gösterim
  • Son yanıtı yazan: gnittala

more options

I have a code to fire on exiting full screen mode. Therefore, i bind it to :

  1. (window.document).keyup(function(e) {
  2. if(e.keyCode === 27 ) {
  3. // do something //
  4. }
  5. });

Now, When i am in fullscreen mode,

1. When i press "ESC", Fullscreen mode exits but my function does not gets fired. 2. When i press "ESC" after fullscreen mode have exited, My function gets fired.

That means "ESC" event was not propagated to code when browser was in fullscreen mode. ( * This works correctly in chrome )

3. This is bit too much too ask, but can i bind browser's exit full screen button which appears at the top ??

I have a code to fire on exiting full screen mode. Therefore, i bind it to : # (window.document).keyup(function(e) { # if(e.keyCode === 27 ) { # // do something // # } # }); Now, When i am in fullscreen mode, 1. When i press "ESC", Fullscreen mode exits but my function does not gets fired. 2. When i press "ESC" after fullscreen mode have exited, My function gets fired. That means "ESC" event was not propagated to code when browser was in fullscreen mode. ( * This works correctly in chrome ) 3. This is bit too much too ask, but can i bind browser's exit full screen button which appears at the top ??

Tüm Yanıtlar (1)

more options

If you are using HTML5, I think the way to do is to bind with the fullscreen APIs that are still inprogress. You could try these two links to see if that helps you

  1. HTML5 Full screen API
  2. Mozilla support for fullscreen
  3. HTML5 fullscreen API

You could create an event listener for the document.cancelFullScreen() and then see if that helps.

Any specific reason why you want to bind to the button and not to the event?