- From: Simon Pieters <notifications@github.com>
- Date: Mon, 29 Jan 2024 05:49:35 -0800
- To: w3c/uievents <uievents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/uievents/issues/367@github.com>
See https://github.com/w3c/uievents/pull/362#discussion_r1458219635 https://html.spec.whatwg.org/#drag-and-drop-processing-model defines the drag and drop model and some events, and refers to Pointer Events spec for some events. When performing a drag and drop operation in an editing host (or dropping in an editing host), browsers fire `textInput`, `beforeinput`, mutation events, `input` -- which isn't currently defined as far as I can tell. Interestingly, the event order in Chromium and WebKit is `textInput` and then `beforeinput`, which maybe should be the other way around for consistency with input from typing. Demo: https://software.hixie.ch/utilities/js/live-dom-viewer/saved/11841 I think this should integrate somehow with this part of HTML: > If the [current target element](https://html.spec.whatwg.org/#current-target-element) is a text control (e.g., [textarea](https://html.spec.whatwg.org/#the-textarea-element), or an [input](https://html.spec.whatwg.org/#the-input-element) element whose [type](https://html.spec.whatwg.org/#attr-input-type) attribute is in the [Text](https://html.spec.whatwg.org/#text-(type=text)-state-and-search-state-(type=search)) state) or an [editing host](https://html.spec.whatwg.org/#editing-host) or [editable](https://w3c.github.io/editing/docs/execCommand/#editable) element, and the [drag data store item list](https://html.spec.whatwg.org/#drag-data-store-item-list) has an item with [the drag data item type string](https://html.spec.whatwg.org/#the-drag-data-item-type-string) "[text/plain](https://www.rfc-editor.org/rfc/rfc2046#section-4.1.3)" and [the drag data item kind](https://html.spec.whatwg.org/#the-drag-data-item-kind) text > > Insert the actual data of the first item in the [drag data store item list](https://html.spec.whatwg.org/#drag-data-store-item-list) to have [a drag data item type string](https://html.spec.whatwg.org/#the-drag-data-item-type-string) of "[text/plain](https://www.rfc-editor.org/rfc/rfc2046#section-4.1.3)" and [a drag data item kind](https://html.spec.whatwg.org/#the-drag-data-item-kind) that is text into the text control or [editing host](https://html.spec.whatwg.org/#editing-host) or [editable](https://w3c.github.io/editing/docs/execCommand/#editable) element in a manner consistent with platform-specific conventions (e.g. inserting it at the current mouse cursor position, or inserting it at the end of the field). -- Reply to this email directly or view it on GitHub: https://github.com/w3c/uievents/issues/367 You are receiving this because you are subscribed to this thread. Message ID: <w3c/uievents/issues/367@github.com>
Received on Monday, 29 January 2024 13:49:41 UTC