Intent to Ship: DataTransfer property for insertFromPaste, insertFromDrop and insertReplacementText input events

8 views
Skip to first unread message

Chromestatus

unread,
2:37 AM (6 hours ago) 2:37 AM
to blin...@chromium.org, prana...@microsoft.com, rago...@microsoft.com
Contact emails
prana...@microsoft.com

Specification
https://w3c.github.io/input-events/#dom-inputevent-datatransfer

Summary
Populate the dataTransfer property on input events with inputType of insertFromPaste, insertFromDrop, and insertReplacementText to provide access to clipboard and drag-drop data during editing operations in contenteditable elements. The dataTransfer object contains the same data that was available during the beforeinput event. This feature only applies to contenteditable elements. For form controls (textarea, input), the behavior remains unchanged - the data property contains the inserted text and dataTransfer remains null. Both Safari and Firefox already support this functionality. Chromium adopting this feature will enhance interoperability across browsers, providing a more consistent experience for web authors.

Blink component
Blink>Editing>InputEvent

Web Feature ID
input-event

TAG review
None

TAG review status
Not applicable

Risks


Interoperability and Compatibility
None

Gecko: Shipped/Shipping (https://developer.mozilla.org/en-US/docs/Web/API/InputEvent/dataTransfer)

WebKit: Shipped/Shipping (https://webkit.org/blog/7358/enhanced-editing-with-input-events)

Web developers: No signals

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None


Debuggability
No additional Devtools support is needed to debug this feature.

Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?
Yes

Is this feature fully tested by web-platform-tests?
Yes
https://wpt.fyi/results/editing/other/data_transfer_on_input_event_with_insertfrompaste_type.html?label=experimental&label=master&aligned https://wpt.live/html/editing/dnd/events/dragdrop-text-elements-input-event-manual.html https://wpt.live/html/editing/editing-0/contenteditable/spellcheck-insertReplacementText-input-event-manual.html

Flag name on about://flags
None

Finch feature name
InputEventDataTransferForInsertCmd

Rollout plan
Will ship enabled for all users

Requires code in //chrome?
False

Tracking bug
https://issues.chromium.org/issues/401593412

Estimated milestones
Shipping on desktop143
Shipping on Android143
Shipping on WebView143
Shipping on iOS143


Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

None

Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/6715253274181632?gate=5118342993805312

This intent message was generated by Chrome Platform Status.
Reply all
Reply to author
Forward
0 new messages