<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>279030</bug_id>
          
          <creation_ts>2024-09-02 11:35:32 -0700</creation_ts>
          <short_desc>Escape key does not fire keyup when exiting fullscreen</short_desc>
          <delta_ts>2026-01-25 21:30:45 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>UI Events</component>
          <version>Safari 17</version>
          <rep_platform>Mac (Apple Silicon)</rep_platform>
          <op_sys>macOS 14</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>276855</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter>bitbof</reporter>
          <assigned_to name="Abrar Rahman Protyasha">a_protyasha</assigned_to>
          <cc>ap</cc>
    
    <cc>jer.noble</cc>
    
    <cc>marcosc</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2057070</commentid>
    <comment_count>0</comment_count>
    <who name="">bitbof</who>
    <bug_when>2024-09-02 11:35:32 -0700</bug_when>
    <thetext>Steps to reproduce:
- On macOS, in Safari, open a webpage with window.addEventListener(&apos;keydown&apos;, ...) and window.addEventListener(&apos;keyup&apos;, ...)
- &quot;Enter Full Screen&quot; - via green window button or Ctrl + Cmd + F
- Press the escape key

Can also be tried with the logger here: https://bitbof.github.io/browser-bug-demos/2024-09-02-safari-mac-escape-key/

Actual results:

Does not fire keyup for escape key

Expected results:

Fires keydown and keyup for escape key</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2057072</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2024-09-02 11:52:50 -0700</bug_when>
    <thetext>Thank you for the report. This seems like a rather extreme edge case, could you please add some color around whether this is important for you and your users?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2057088</commentid>
    <comment_count>2</comment_count>
    <who name="">bitbof</who>
    <bug_when>2024-09-02 12:46:18 -0700</bug_when>
    <thetext>It breaks keyboard shortcuts in my app (it does happen to users), but there workarounds, and I can imagine a more robust implementation for keyboard shortcuts on my end. It would have been less confusing, but it&apos;s not that important.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2058677</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-09-09 11:36:15 -0700</bug_when>
    <thetext>&lt;rdar://problem/135564636&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>