<?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>253409</bug_id>
          
          <creation_ts>2023-03-05 06:02:53 -0800</creation_ts>
          <short_desc>maxlength test for &lt;textarea&gt; failing when ran in a third-party iframe</short_desc>
          <delta_ts>2023-11-23 04:37:10 -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>Forms</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=235670</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ahmad Saleem">ahmad.saleem792</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>akeerthi</cc>
    
    <cc>cdumez</cc>
    
    <cc>karlcow</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1938934</commentid>
    <comment_count>0</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-03-05 06:02:53 -0800</bug_when>
    <thetext>Hi Team,

I came across following two tests from Blink repo / Chromium Source and noted that WebKit ToT (261243@main) are failing some of them:

Test (max length): https://jsfiddle.net/pLahgb8q/show (Firefox Nightly 112 only fails two while WebKit / Safari fails a lot more)

Test (min length): https://jsfiddle.net/ts7ad8zp/show. (Firefox Nightly 112 fails both same test as of Safari / WebKit)

^ Chrome Canary 113 passes all of above tests.

Just wanted to raise so we can track them.

Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1938970</commentid>
    <comment_count>1</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2023-03-05 14:37:17 -0800</bug_when>
    <thetext>https://jsfiddle.net/ts7ad8zp/show is already fully passing on trunk. The 2 failures are not real failures, the exception name matches, only the exception string doesn&apos;t. We can choose whatever string/description we want for exceptions.

https://jsfiddle.net/pLahgb8q/show does have a few legit-looking failures though. Firefox and Chrome pass all the tests, we don&apos;t.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1938972</commentid>
    <comment_count>2</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2023-03-05 14:42:13 -0800</bug_when>
    <thetext>(In reply to Chris Dumez from comment #1)
&gt; https://jsfiddle.net/ts7ad8zp/show is already fully passing on trunk. The 2
&gt; failures are not real failures, the exception name matches, only the
&gt; exception string doesn&apos;t. We can choose whatever string/description we want
&gt; for exceptions.
&gt; 
&gt; https://jsfiddle.net/pLahgb8q/show does have a few legit-looking failures
&gt; though. Firefox and Chrome pass all the tests, we don&apos;t.

The weird thing though is I thought I had imported https://jsfiddle.net/pLahgb8q/show as layout test as LayoutTests/fast/forms/textarea-maxlength.html. However, we are passing all the checks for this test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1938973</commentid>
    <comment_count>3</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-03-05 14:43:24 -0800</bug_when>
    <thetext>(In reply to Chris Dumez from comment #2)
&gt; (In reply to Chris Dumez from comment #1)
&gt; &gt; https://jsfiddle.net/ts7ad8zp/show is already fully passing on trunk. The 2
&gt; &gt; failures are not real failures, the exception name matches, only the
&gt; &gt; exception string doesn&apos;t. We can choose whatever string/description we want
&gt; &gt; for exceptions.
&gt; &gt; 
&gt; &gt; https://jsfiddle.net/pLahgb8q/show does have a few legit-looking failures
&gt; &gt; though. Firefox and Chrome pass all the tests, we don&apos;t.
&gt; 
&gt; The weird thing though is I thought I had imported
&gt; https://jsfiddle.net/pLahgb8q/show as layout test as
&gt; LayoutTests/fast/forms/textarea-maxlength.html. However, we are passing all
&gt; the checks for this test.

I took updated copy of test from https://source.chromium.org/.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1938974</commentid>
    <comment_count>4</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2023-03-05 14:44:21 -0800</bug_when>
    <thetext>(In reply to Ahmad Saleem from comment #3)
&gt; (In reply to Chris Dumez from comment #2)
&gt; &gt; (In reply to Chris Dumez from comment #1)
&gt; &gt; &gt; https://jsfiddle.net/ts7ad8zp/show is already fully passing on trunk. The 2
&gt; &gt; &gt; failures are not real failures, the exception name matches, only the
&gt; &gt; &gt; exception string doesn&apos;t. We can choose whatever string/description we want
&gt; &gt; &gt; for exceptions.
&gt; &gt; &gt; 
&gt; &gt; &gt; https://jsfiddle.net/pLahgb8q/show does have a few legit-looking failures
&gt; &gt; &gt; though. Firefox and Chrome pass all the tests, we don&apos;t.
&gt; &gt; 
&gt; &gt; The weird thing though is I thought I had imported
&gt; &gt; https://jsfiddle.net/pLahgb8q/show as layout test as
&gt; &gt; LayoutTests/fast/forms/textarea-maxlength.html. However, we are passing all
&gt; &gt; the checks for this test.
&gt; 
&gt; I took updated copy of test from https://source.chromium.org/.

LayoutTests/fast/forms/textarea-maxlength.html is a straight copy of Blink&apos;s
web_tests/fast/forms/textarea/textarea-maxlength.html as far as I can tell.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1938975</commentid>
    <comment_count>5</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-03-05 14:46:26 -0800</bug_when>
    <thetext>(In reply to Chris Dumez from comment #4)
&gt; (In reply to Ahmad Saleem from comment #3)
&gt; &gt; (In reply to Chris Dumez from comment #2)
&gt; &gt; &gt; (In reply to Chris Dumez from comment #1)
&gt; &gt; &gt; &gt; https://jsfiddle.net/ts7ad8zp/show is already fully passing on trunk. The 2
&gt; &gt; &gt; &gt; failures are not real failures, the exception name matches, only the
&gt; &gt; &gt; &gt; exception string doesn&apos;t. We can choose whatever string/description we want
&gt; &gt; &gt; &gt; for exceptions.
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; https://jsfiddle.net/pLahgb8q/show does have a few legit-looking failures
&gt; &gt; &gt; &gt; though. Firefox and Chrome pass all the tests, we don&apos;t.
&gt; &gt; &gt; 
&gt; &gt; &gt; The weird thing though is I thought I had imported
&gt; &gt; &gt; https://jsfiddle.net/pLahgb8q/show as layout test as
&gt; &gt; &gt; LayoutTests/fast/forms/textarea-maxlength.html. However, we are passing all
&gt; &gt; &gt; the checks for this test.
&gt; &gt; 
&gt; &gt; I took updated copy of test from https://source.chromium.org/.
&gt; 
&gt; LayoutTests/fast/forms/textarea-maxlength.html is a straight copy of Blink&apos;s
&gt; web_tests/fast/forms/textarea/textarea-maxlength.html as far as I can tell.

You are right. I just did &apos;diffcheck&apos; on both test and except &apos;Error String&apos; and one comment, there is no difference in both.

Weird - if these tests are failing in JSFiddle but passing via Test Runner.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1938976</commentid>
    <comment_count>6</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2023-03-05 14:47:50 -0800</bug_when>
    <thetext>(In reply to Ahmad Saleem from comment #5)
&gt; (In reply to Chris Dumez from comment #4)
&gt; &gt; (In reply to Ahmad Saleem from comment #3)
&gt; &gt; &gt; (In reply to Chris Dumez from comment #2)
&gt; &gt; &gt; &gt; (In reply to Chris Dumez from comment #1)
&gt; &gt; &gt; &gt; &gt; https://jsfiddle.net/ts7ad8zp/show is already fully passing on trunk. The 2
&gt; &gt; &gt; &gt; &gt; failures are not real failures, the exception name matches, only the
&gt; &gt; &gt; &gt; &gt; exception string doesn&apos;t. We can choose whatever string/description we want
&gt; &gt; &gt; &gt; &gt; for exceptions.
&gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; https://jsfiddle.net/pLahgb8q/show does have a few legit-looking failures
&gt; &gt; &gt; &gt; &gt; though. Firefox and Chrome pass all the tests, we don&apos;t.
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; The weird thing though is I thought I had imported
&gt; &gt; &gt; &gt; https://jsfiddle.net/pLahgb8q/show as layout test as
&gt; &gt; &gt; &gt; LayoutTests/fast/forms/textarea-maxlength.html. However, we are passing all
&gt; &gt; &gt; &gt; the checks for this test.
&gt; &gt; &gt; 
&gt; &gt; &gt; I took updated copy of test from https://source.chromium.org/.
&gt; &gt; 
&gt; &gt; LayoutTests/fast/forms/textarea-maxlength.html is a straight copy of Blink&apos;s
&gt; &gt; web_tests/fast/forms/textarea/textarea-maxlength.html as far as I can tell.
&gt; 
&gt; You are right. I just did &apos;diffcheck&apos; on both test and except &apos;Error String&apos;
&gt; and one comment, there is no difference in both.
&gt; 
&gt; Weird - if these tests are failing in JSFiddle but passing via Test Runner.

Indeed! Might be a behavior difference when running in a third-party iframe (since that&apos;s how jsFiddle runs the test case).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1938977</commentid>
    <comment_count>7</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-03-05 14:48:47 -0800</bug_when>
    <thetext>(In reply to Chris Dumez from comment #6)
&gt; (In reply to Ahmad Saleem from comment #5)
&gt; &gt; (In reply to Chris Dumez from comment #4)
&gt; &gt; &gt; (In reply to Ahmad Saleem from comment #3)
&gt; &gt; &gt; &gt; (In reply to Chris Dumez from comment #2)
&gt; &gt; &gt; &gt; &gt; (In reply to Chris Dumez from comment #1)
&gt; &gt; &gt; &gt; &gt; &gt; https://jsfiddle.net/ts7ad8zp/show is already fully passing on trunk. The 2
&gt; &gt; &gt; &gt; &gt; &gt; failures are not real failures, the exception name matches, only the
&gt; &gt; &gt; &gt; &gt; &gt; exception string doesn&apos;t. We can choose whatever string/description we want
&gt; &gt; &gt; &gt; &gt; &gt; for exceptions.
&gt; &gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; &gt; https://jsfiddle.net/pLahgb8q/show does have a few legit-looking failures
&gt; &gt; &gt; &gt; &gt; &gt; though. Firefox and Chrome pass all the tests, we don&apos;t.
&gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; The weird thing though is I thought I had imported
&gt; &gt; &gt; &gt; &gt; https://jsfiddle.net/pLahgb8q/show as layout test as
&gt; &gt; &gt; &gt; &gt; LayoutTests/fast/forms/textarea-maxlength.html. However, we are passing all
&gt; &gt; &gt; &gt; &gt; the checks for this test.
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; I took updated copy of test from https://source.chromium.org/.
&gt; &gt; &gt; 
&gt; &gt; &gt; LayoutTests/fast/forms/textarea-maxlength.html is a straight copy of Blink&apos;s
&gt; &gt; &gt; web_tests/fast/forms/textarea/textarea-maxlength.html as far as I can tell.
&gt; &gt; 
&gt; &gt; You are right. I just did &apos;diffcheck&apos; on both test and except &apos;Error String&apos;
&gt; &gt; and one comment, there is no difference in both.
&gt; &gt; 
&gt; &gt; Weird - if these tests are failing in JSFiddle but passing via Test Runner.
&gt; 
&gt; Indeed! Might be a behavior difference when running in a third-party iframe
&gt; (since that&apos;s how jsFiddle runs the test case).

Let me make local HTML and then run them on WebKit ToT local build.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1938979</commentid>
    <comment_count>8</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-03-05 14:50:34 -0800</bug_when>
    <thetext>(In reply to Ahmad Saleem from comment #7)
&gt; (In reply to Chris Dumez from comment #6)
&gt; &gt; (In reply to Ahmad Saleem from comment #5)
&gt; &gt; &gt; (In reply to Chris Dumez from comment #4)
&gt; &gt; &gt; &gt; (In reply to Ahmad Saleem from comment #3)
&gt; &gt; &gt; &gt; &gt; (In reply to Chris Dumez from comment #2)
&gt; &gt; &gt; &gt; &gt; &gt; (In reply to Chris Dumez from comment #1)
&gt; &gt; &gt; &gt; &gt; &gt; &gt; https://jsfiddle.net/ts7ad8zp/show is already fully passing on trunk. The 2
&gt; &gt; &gt; &gt; &gt; &gt; &gt; failures are not real failures, the exception name matches, only the
&gt; &gt; &gt; &gt; &gt; &gt; &gt; exception string doesn&apos;t. We can choose whatever string/description we want
&gt; &gt; &gt; &gt; &gt; &gt; &gt; for exceptions.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; &gt; &gt; https://jsfiddle.net/pLahgb8q/show does have a few legit-looking failures
&gt; &gt; &gt; &gt; &gt; &gt; &gt; though. Firefox and Chrome pass all the tests, we don&apos;t.
&gt; &gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; &gt; The weird thing though is I thought I had imported
&gt; &gt; &gt; &gt; &gt; &gt; https://jsfiddle.net/pLahgb8q/show as layout test as
&gt; &gt; &gt; &gt; &gt; &gt; LayoutTests/fast/forms/textarea-maxlength.html. However, we are passing all
&gt; &gt; &gt; &gt; &gt; &gt; the checks for this test.
&gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; I took updated copy of test from https://source.chromium.org/.
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; LayoutTests/fast/forms/textarea-maxlength.html is a straight copy of Blink&apos;s
&gt; &gt; &gt; &gt; web_tests/fast/forms/textarea/textarea-maxlength.html as far as I can tell.
&gt; &gt; &gt; 
&gt; &gt; &gt; You are right. I just did &apos;diffcheck&apos; on both test and except &apos;Error String&apos;
&gt; &gt; &gt; and one comment, there is no difference in both.
&gt; &gt; &gt; 
&gt; &gt; &gt; Weird - if these tests are failing in JSFiddle but passing via Test Runner.
&gt; &gt; 
&gt; &gt; Indeed! Might be a behavior difference when running in a third-party iframe
&gt; &gt; (since that&apos;s how jsFiddle runs the test case).
&gt; 
&gt; Let me make local HTML and then run them on WebKit ToT local build.

Yes - it is JSFiddle playing around. Using local copy on WebKit ToT, we pass all tests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1938980</commentid>
    <comment_count>9</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2023-03-05 14:51:39 -0800</bug_when>
    <thetext>(In reply to Ahmad Saleem from comment #8)
&gt; (In reply to Ahmad Saleem from comment #7)
&gt; &gt; (In reply to Chris Dumez from comment #6)
&gt; &gt; &gt; (In reply to Ahmad Saleem from comment #5)
&gt; &gt; &gt; &gt; (In reply to Chris Dumez from comment #4)
&gt; &gt; &gt; &gt; &gt; (In reply to Ahmad Saleem from comment #3)
&gt; &gt; &gt; &gt; &gt; &gt; (In reply to Chris Dumez from comment #2)
&gt; &gt; &gt; &gt; &gt; &gt; &gt; (In reply to Chris Dumez from comment #1)
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; https://jsfiddle.net/ts7ad8zp/show is already fully passing on trunk. The 2
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; failures are not real failures, the exception name matches, only the
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; exception string doesn&apos;t. We can choose whatever string/description we want
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; for exceptions.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; https://jsfiddle.net/pLahgb8q/show does have a few legit-looking failures
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; though. Firefox and Chrome pass all the tests, we don&apos;t.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; &gt; &gt; The weird thing though is I thought I had imported
&gt; &gt; &gt; &gt; &gt; &gt; &gt; https://jsfiddle.net/pLahgb8q/show as layout test as
&gt; &gt; &gt; &gt; &gt; &gt; &gt; LayoutTests/fast/forms/textarea-maxlength.html. However, we are passing all
&gt; &gt; &gt; &gt; &gt; &gt; &gt; the checks for this test.
&gt; &gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; &gt; I took updated copy of test from https://source.chromium.org/.
&gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; LayoutTests/fast/forms/textarea-maxlength.html is a straight copy of Blink&apos;s
&gt; &gt; &gt; &gt; &gt; web_tests/fast/forms/textarea/textarea-maxlength.html as far as I can tell.
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; You are right. I just did &apos;diffcheck&apos; on both test and except &apos;Error String&apos;
&gt; &gt; &gt; &gt; and one comment, there is no difference in both.
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; Weird - if these tests are failing in JSFiddle but passing via Test Runner.
&gt; &gt; &gt; 
&gt; &gt; &gt; Indeed! Might be a behavior difference when running in a third-party iframe
&gt; &gt; &gt; (since that&apos;s how jsFiddle runs the test case).
&gt; &gt; 
&gt; &gt; Let me make local HTML and then run them on WebKit ToT local build.
&gt; 
&gt; Yes - it is JSFiddle playing around. Using local copy on WebKit ToT, we pass
&gt; all tests.

Looking at the test case, I bet this is a focus behavior difference. I suspect the JS is not able to focus the fields in the third-party iframe and thus we end up with empty fields.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1938983</commentid>
    <comment_count>10</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-03-05 14:57:30 -0800</bug_when>
    <thetext>(In reply to Chris Dumez from comment #9)
&gt; (In reply to Ahmad Saleem from comment #8)
&gt; &gt; (In reply to Ahmad Saleem from comment #7)
&gt; &gt; &gt; (In reply to Chris Dumez from comment #6)
&gt; &gt; &gt; &gt; (In reply to Ahmad Saleem from comment #5)
&gt; &gt; &gt; &gt; &gt; (In reply to Chris Dumez from comment #4)
&gt; &gt; &gt; &gt; &gt; &gt; (In reply to Ahmad Saleem from comment #3)
&gt; &gt; &gt; &gt; &gt; &gt; &gt; (In reply to Chris Dumez from comment #2)
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; (In reply to Chris Dumez from comment #1)
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; https://jsfiddle.net/ts7ad8zp/show is already fully passing on trunk. The 2
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; failures are not real failures, the exception name matches, only the
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; exception string doesn&apos;t. We can choose whatever string/description we want
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; for exceptions.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; https://jsfiddle.net/pLahgb8q/show does have a few legit-looking failures
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; though. Firefox and Chrome pass all the tests, we don&apos;t.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; The weird thing though is I thought I had imported
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; https://jsfiddle.net/pLahgb8q/show as layout test as
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; LayoutTests/fast/forms/textarea-maxlength.html. However, we are passing all
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; the checks for this test.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; &gt; &gt; I took updated copy of test from https://source.chromium.org/.
&gt; &gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; &gt; LayoutTests/fast/forms/textarea-maxlength.html is a straight copy of Blink&apos;s
&gt; &gt; &gt; &gt; &gt; &gt; web_tests/fast/forms/textarea/textarea-maxlength.html as far as I can tell.
&gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; You are right. I just did &apos;diffcheck&apos; on both test and except &apos;Error String&apos;
&gt; &gt; &gt; &gt; &gt; and one comment, there is no difference in both.
&gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; Weird - if these tests are failing in JSFiddle but passing via Test Runner.
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; Indeed! Might be a behavior difference when running in a third-party iframe
&gt; &gt; &gt; &gt; (since that&apos;s how jsFiddle runs the test case).
&gt; &gt; &gt; 
&gt; &gt; &gt; Let me make local HTML and then run them on WebKit ToT local build.
&gt; &gt; 
&gt; &gt; Yes - it is JSFiddle playing around. Using local copy on WebKit ToT, we pass
&gt; &gt; all tests.
&gt; 
&gt; Looking at the test case, I bet this is a focus behavior difference. I
&gt; suspect the JS is not able to focus the fields in the third-party iframe and
&gt; thus we end up with empty fields.

Should we mark this as &quot;RESOLVED INVALID&quot; or rename title to something along the lines of &apos;focus&apos; issue in third party iframes?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1938985</commentid>
    <comment_count>11</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2023-03-05 15:08:03 -0800</bug_when>
    <thetext>In Element::focus(), we have:
```
        if (!frame.hasHadUserInteraction() &amp;&amp; !frame.isMainFrame() &amp;&amp; !document-&gt;topOrigin().isSameOriginDomain(document-&gt;securityOrigin()))
            return;
```

Which means that we don&apos;t allow elements in third-party frames to get focus in JS without a user interaction. This behavior appears to be stricter than both Chrome and Firefox so it may be a compatibility risk

I am adding a few people in CC would know more about focus than I do to see if we should update our behavior.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1940701</commentid>
    <comment_count>12</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-03-12 07:03:14 -0700</bug_when>
    <thetext>&lt;rdar://problem/106615378&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1950625</commentid>
    <comment_count>13</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-04-23 01:48:10 -0700</bug_when>
    <thetext>*** Bug 249907 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1954674</commentid>
    <comment_count>14</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-05-11 04:25:11 -0700</bug_when>
    <thetext>*** Bug 250650 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1994519</commentid>
    <comment_count>15</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-11-23 04:37:10 -0800</bug_when>
    <thetext>*** Bug 265282 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>