<?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>119713</bug_id>
          
          <creation_ts>2013-08-12 19:19:24 -0700</creation_ts>
          <short_desc>Remove focus if supportsFocus state is changed</short_desc>
          <delta_ts>2022-08-18 17:24:28 -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>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BlinkMergeCandidate, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>112992</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ryosuke Niwa">rniwa</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>ntim</cc>
    
    <cc>tkent</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>916491</commentid>
    <comment_count>0</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2013-08-12 19:19:24 -0700</bug_when>
    <thetext>Consider merging https://chromium.googlesource.com/chromium/blink/+/bdf4e305bcf5a7ab899f06a2cc697acaa9ab8116

Changes of *[tabindex], a[href], button[disabled], etc. affect focusable state,
but these changes don&apos;t always trigger layout. We need to ask focus check
explicitly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1890147</commentid>
    <comment_count>1</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-08-09 16:48:25 -0700</bug_when>
    <thetext>I took test cases from Chrome Commit:

Test Case 1 - https://jsfiddle.net/ojL52nsq/show

*** Safari 15.6 on macOS 12.6 ***

AIL document.activeElement should be javascript:. Was [object HTMLBodyElement].
Remove href.
FAIL No blur event
PASS successfullyParsed is true

TEST COMPLETE
link

&gt;&gt;&gt;&gt; then Safari HANGS!!


*** Firefox Nightly 105 ***

PASS document.activeElement is target
Remove href.
FAIL No blur event
PASS successfullyParsed is true

TEST COMPLETE
PASS blur event was disaptched.
PASS successfullyParsed is true

TEST COMPLETE

*** Chrome Canary 106 ***

PASS document.activeElement is target
Remove href.
PASS blur event was disaptched.
PASS successfullyParsed is true

TEST COMPLETE
FAIL No blur event
PASS successfullyParsed is true

TEST COMPLETE

______________

Test Case 2 - https://jsfiddle.net/r3x84k6y/show

*** Safari 15.6 on macOS 12.5 ***

FAIL document.activeElement should be [object HTMLDivElement]. Was [object HTMLBodyElement].
Remove tabindex.
FAIL No blur event
PASS successfullyParsed is true

TEST COMPLETE
div

&gt;&gt;&gt;&gt; then Safari HANGS!!

*** Chrome Canary 106 ***

PASS document.activeElement is target
Remove tabindex.
PASS blur event was disaptched.
PASS successfullyParsed is true

TEST COMPLETE
FAIL No blur event
PASS successfullyParsed is true

TEST COMPLETE

*** Firefox Nightly 105 ***

PASS document.activeElement is target
Remove tabindex.
FAIL No blur event
PASS successfullyParsed is true

TEST COMPLETE
PASS blur event was disaptched.
PASS successfullyParsed is true

TEST COMPLETE

____________

Test Case 3 - https://jsfiddle.net/ob561dma/show

*** Safari 15.6 on macOS 12.5 ***

FAIL document.activeElement should be [object HTMLButtonElement]. Was [object HTMLBodyElement].
Clicking a button makes the button disabled.
FAIL No blur event.
PASS successfullyParsed is true

TEST COMPLETE

*** Chrome Canary 106 ***

FAIL document.activeElement should be [object HTMLButtonElement]. Was [object HTMLBodyElement].
Clicking a button makes the button disabled.
FAIL No blur event.
PASS successfullyParsed is true

TEST COMPLETE

*** Firefox Nightly 105 ***

FAIL document.activeElement should be [object HTMLButtonElement]. Was [object HTMLBodyElement].
Clicking a button makes the button disabled.
FAIL No blur event.
PASS successfullyParsed is true

TEST COMPLETE

__________________

I just wanted to share updated test results and it shows that Safari do differ from other browsers in some cases. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1890347</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-08-10 10:56:09 -0700</bug_when>
    <thetext>&lt;rdar://problem/98460092&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>