<?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>268988</bug_id>
          
          <creation_ts>2024-02-08 07:58:09 -0800</creation_ts>
          <short_desc>The beforeinput event should fire before textInput</short_desc>
          <delta_ts>2024-05-22 00:06:08 -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>HTML Editing</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>REOPENED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar, WPTImpact</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>274500</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Pieters (:zcorpan)">zcorpan</reporter>
          <assigned_to name="sideshowbarker">mike</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>gsnedders</cc>
    
    <cc>karlcow</cc>
    
    <cc>mike</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2011750</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Pieters (:zcorpan)">zcorpan</who>
    <bug_when>2024-02-08 07:58:09 -0800</bug_when>
    <thetext>WebKit fires the textInput event before the beforeinput event when typing in an &lt;input&gt;, &lt;textarea&gt; or &lt;div contenteditable&gt;.

Chromium fires beforeinput first, which matches the proposed spec.

Spec: https://github.com/w3c/uievents/pull/362
Tests: https://github.com/web-platform-tests/wpt/pull/44472
Test results: https://wpt.fyi/results/uievents/textInput/api.html?label=pr_head&amp;max-count=1&amp;pr=44472</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2013950</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-02-15 07:59:28 -0800</bug_when>
    <thetext>&lt;rdar://problem/123013293&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2015055</commentid>
    <comment_count>2</comment_count>
    <who name="sideshowbarker">mike</who>
    <bug_when>2024-02-19 04:19:28 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/24735</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2015158</commentid>
    <comment_count>3</comment_count>
    <who name="sideshowbarker">mike</who>
    <bug_when>2024-02-19 10:08:53 -0800</bug_when>
    <thetext>I believe the patch in https://github.com/WebKit/WebKit/pull/24735 could fix this, but I don’t have any way to test it against the https://github.com/web-platform-tests/wpt/pull/44472 tests with my build — because the tests time out unexpectedly.

From chatting with Sam, I’ve gleaned that the unexpected time out might be due to testdriver having not yet implemented something that the WPT tests rely on.

The wpt.fyi runner apparently instead uses the WebDriver implementation in wptrunner, which does implement what the WPT tests rely on.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2015167</commentid>
    <comment_count>4</comment_count>
    <who name="sideshowbarker">mike</who>
    <bug_when>2024-02-19 10:43:49 -0800</bug_when>
    <thetext>Don’t the existing WebKit test results at https://github.com/WebKit/WebKit/blob/main/LayoutTests/fast/events/input-events-fired-when-typing-expected.txt  actually indicate that WebKit is already actually firing the beforeinput first, as expected?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2015399</commentid>
    <comment_count>5</comment_count>
    <who name="sideshowbarker">mike</who>
    <bug_when>2024-02-19 21:02:55 -0800</bug_when>
    <thetext>(In reply to sideshowbarker from comment #4)
&gt; Don’t the existing WebKit test results at
&gt; https://github.com/WebKit/WebKit/blob/main/LayoutTests/fast/events/input-
&gt; events-fired-when-typing-expected.txt  actually indicate that WebKit is
&gt; already actually firing the beforeinput first, as expected?

Nevermind — that test as currently written doesn’t actually check for the textInput event at all. And when I modify it locally to add a check for the textInput event, I can see it too shows that textInput is getting fired before beforeinput.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2036305</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-05-19 15:43:56 -0700</bug_when>
    <thetext>Committed 278971@main (7da094e1da19): &lt;https://commits.webkit.org/278971@main&gt;

Reviewed commits have been landed. Closing PR #24735 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2036917</commentid>
    <comment_count>7</comment_count>
    <who name="sideshowbarker">mike</who>
    <bug_when>2024-05-21 21:45:03 -0700</bug_when>
    <thetext>Reopened Bugzilla.
REGRESSION (278971@main): [iOS] Form submission does not occur when pressing the return key, tracking revert in https://bugs.webkit.org/show_bug.cgi?id=274500.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2036936</commentid>
    <comment_count>8</comment_count>
    <who name="sideshowbarker">mike</who>
    <bug_when>2024-05-22 00:06:08 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/28902</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>