<?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>309586</bug_id>
          
          <creation_ts>2026-03-10 11:43:52 -0700</creation_ts>
          <short_desc>Clear focus from elements outside the fullscreen element when entering fullscreen</short_desc>
          <delta_ts>2026-10-15 02:11:40 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>REOPENED</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=266476</see_also>
          <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>
          <dependson>316115</dependson>
          <blocked>276855</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="pascoe@apple.com">pascoe</reporter>
          <assigned_to name="pascoe@apple.com">pascoe</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>fred.wang</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2188781</commentid>
    <comment_count>0</comment_count>
    <who name="pascoe@apple.com">pascoe</who>
    <bug_when>2026-03-10 11:43:52 -0700</bug_when>
    <thetext>When a user clicks a fullscreen button on some sites, the button enters
`:focus`/`:focus-visible` and `:hover` states.  After the fullscreen transition
these states persist because no blur is triggered on the button, and no
`mousemove` is synthesized to update hit-testing, leaving the button stuck in
a highlighted state.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2188782</commentid>
    <comment_count>1</comment_count>
    <who name="pascoe@apple.com">pascoe</who>
    <bug_when>2026-03-10 11:44:01 -0700</bug_when>
    <thetext>rdar://157694866</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2188785</commentid>
    <comment_count>2</comment_count>
    <who name="pascoe@apple.com">pascoe</who>
    <bug_when>2026-03-10 11:48:52 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/60287</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2204300</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-04-24 15:56:29 -0700</bug_when>
    <thetext>Committed 311986@main (4771a54c1936): &lt;https://commits.webkit.org/311986@main&gt;

Reviewed commits have been landed. Closing PR #60287 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2216837</commentid>
    <comment_count>4</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2026-06-02 11:19:06 -0700</bug_when>
    <thetext>Re-opened since this is blocked by bug 316115</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2262426</commentid>
    <comment_count>5</comment_count>
      <attachid>481761</attachid>
    <who name="Frédéric Wang Nélar">fred.wang</who>
    <bug_when>2026-10-12 01:56:39 -0700</bug_when>
    <thetext>Created attachment 481761
testcase

I tried with the attached testcase but on Linux GTK I see the same behavior as Chrome and Firefox:
- :focus and :focus-visible still match after fullscreen
- :hover no longer matches (in the test case the button is moved from the middle to the top of the page)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2262429</commentid>
    <comment_count>6</comment_count>
    <who name="Frédéric Wang Nélar">fred.wang</who>
    <bug_when>2026-10-12 02:03:09 -0700</bug_when>
    <thetext>On macos with tab navigation enabled I see the same behavior.

It seems bug 266476 (which I can reproduce) is related though.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>481761</attachid>
            <date>2026-10-12 01:56:39 -0700</date>
            <delta_ts>2026-10-12 01:56:39 -0700</delta_ts>
            <desc>testcase</desc>
            <filename>309586.html</filename>
            <type>text/html</type>
            <size>316</size>
            <attacher name="Frédéric Wang Nélar">fred.wang</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxzdHlsZT4KICBidXR0b246Zm9jdXMgeyBib3JkZXI6IDVweCBzb2xp
ZCByZWQ7IH0KICBidXR0b246Zm9jdXMtdmlzaWJsZSB7IGJhY2tncm91bmQ6IGxpZ2h0Ymx1ZTsg
fQogIGJ1dHRvbjpob3ZlciB7IGZvbnQtd2VpZ2h0OiBib2xkOyB9Cjwvc3R5bGU+CjxkaXYgc3R5
bGU9ImhlaWdodDogNTB2aCI+PC9kaXY+CjxkaXYgaWQ9ImNvbnRhaW5lciI+CiAgPHA+SGVsbG8g
V29ybGQhPC9wPgogIDxidXR0b24gb25jbGljaz0iY29udGFpbmVyLnJlcXVlc3RGdWxsc2NyZWVu
KCkiPkZ1bGxzY3JlZW48L2J1dHRvbj4KPC9kaXY+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>