IRC log of editing on 2022-08-11

Timestamps are in UTC.

15:03:47 [RRSAgent]
RRSAgent has joined #editing
15:03:47 [RRSAgent]
logging to https://www.w3.org/2022/08/11-editing-irc
15:03:49 [alexk]
alexk has joined #editing
15:03:52 [masonf]
present+
15:04:07 [Travis]
meeting: Web Editing WG - August 11, 2022
15:04:11 [Travis]
present+
15:04:13 [comandeer]
present+
15:04:44 [Travis]
scribe: Travis
15:04:54 [dandclark]
present+
15:04:56 [snianu]
present+
15:05:13 [Travis]
Announcements?
15:05:26 [smaug]
present+
15:06:56 [Travis]
Next meeting will be at TPAC 2022 in Vancouver, on Thursday 15 September.
15:06:57 [Travis]
https://www.w3.org/events/meetings/51055800-c727-4589-b82b-735bec90d77e
15:07:52 [Travis]
I think we should extend our meeting to 2-3 hours instead of just one (at TPAC)
15:08:00 [Travis]
(heard support, no objections)
15:08:49 [Travis]
Topic: async clipboard read & race conditions
15:08:57 [Travis]
github: https://github.com/w3c/clipboard-apis/issues/180
15:10:01 [Travis]
snianu: we looking to figure out if the clipboard content changes between reading system clipboard and santization step... should we just return the content read from the clipboard, throw an error, or return empty clipboard.
15:10:45 [Travis]
.. macOS, iOS have limits as noted by whsieh in the issue.
15:11:10 [Travis]
Travis: do you have a preference?
15:11:32 [Travis]
snianu: came up while working on image sanitization... encode/decode takes some time.
15:12:02 [Travis]
.. when the author makes the read call, the user gave them permission.
15:12:12 [Travis]
.. at that moment, the user is expecting the data in the clipboard.
15:12:21 [Travis]
.. I think it makes sense to return the data (not throw)
15:12:43 [Travis]
.. what if the user switches to another apps, puts something else on the clipboard?
15:13:01 [Travis]
.. if the browser already read the data, then the clipboard content could have changed.
15:13:20 [Travis]
.. currently (in chromium) plan is to return an empty image.
15:13:30 [Travis]
.. we could also throw a data error.
15:14:18 [Travis]
Travis: interesting that the plan is to return an empty image.
15:14:33 [Travis]
.. what to do with non-image cases?
15:15:05 [Travis]
whsieh: I think we should try to match behavior of other apps on the system (for copy/paste)
15:15:10 [Travis]
.. this isn't a common scenario.
15:15:25 [Travis]
.. might be able to craft an image to take a lot of time to decode and switch...
15:15:36 [Travis]
.. in that sense, it probably affects images more than other types (like markup)
15:16:14 [Travis]
.. Always possible to hold a clipboard item and re-read it over and over...
15:16:26 [Travis]
.. wondering what web author expectation is?
15:17:51 [Travis]
.. expect authors to be prepared to handle exceptions.
15:18:22 [Travis]
travis: returning old data (original data post processing) sounds good to me.
15:19:11 [Travis]
whsieh: Q: if the change occurs before the first raw clipboard read, then what happens?
15:20:11 [Travis]
snianu: In Chromium we read all the data at once... I see the issue because with delayed rendering, we don't want to do that...
15:20:45 [Travis]
whsieh: In a delayed world, might make sense to throw an error. Other actions might lead to unpredictable behavior (depending on whether you've read the raw data or not)
15:20:57 [Travis]
snianu: Sounds good.
15:21:24 [Travis]
smaug: There's always a possibility of a race condition.
15:21:33 [Travis]
snianu: So, will resolve to throw an error in this case.
15:21:43 [Travis]
whsieh: Might be interesting to test this for interop as well.
15:21:59 [Travis]
.. having the platform stomp over the clipboard content.
15:22:09 [Travis]
.. we should continue thinking about that.
15:22:59 [Travis]
Topic: Should reading clipboard throw or return empty?
15:23:06 [Travis]
github: https://github.com/w3c/clipboard-apis/issues/179
15:23:28 [Travis]
snianu: Seems like a similar issue to 180.
15:23:55 [Travis]
.. if there's no HTML format in the clipboard, and the author tries to read HTML format, then what?
15:24:06 [Travis]
.. makes sense to throw a DataError.
15:24:16 [Travis]
.. even though the clipboard has some data, just not what is desired.
15:24:58 [Travis]
snianu: If authors are trying to read HTML, but the clipboard has something that's not in the supported types.
15:25:07 [Travis]
.. the clipboard item won't have any data.
15:25:44 [Travis]
whsieh: interesting to note: clipboard being empty is a valid system state.
15:26:19 [Travis]
.. ex: calling clear contents from the OS. The technical truth is that there are no items in the clipboard.
15:27:00 [Travis]
.. how would authors use this knowledge?
15:27:15 [Travis]
.. (trying to come up with a scenario)
15:27:31 [Travis]
.. I guess it makes sense (either way we go) to have some consistency.
15:27:42 [Travis]
snianu: Currently we throw DataError in Chromium. So does Firefox.
15:27:58 [Travis]
whsieh: Pretty sure Webkit will return an empty array of items.
15:28:12 [Travis]
.. I think we can adjust our behavior to match; a DataError seems pretty sensible.
15:29:26 [Travis]
Topic: reviewing any other clipboard-api issues?
15:29:45 [Travis]
snianu: found a bunch of presumably duplicate items.
15:30:18 [Travis]
.. many issue are looking for a way to discover supported types. Adding an API for this could help resolve many of those.
15:31:34 [Travis]
Topic: Selection API for Shadow DOM
15:31:37 [Travis]
github: https://github.com/w3c/editing/issues/403
15:32:15 [Travis]
masonf: Hi folks! I'm masonf, TL at Google.
15:32:33 [masonf]
https://docs.google.com/presentation/d/1GuO7zQlyZ3HN-tR8-qMOorukGAgLBf0MdQmaiWdfFEU/edit#slide=id.p
15:32:38 [Travis]
.. (presenting slides)
15:33:09 [Travis]
.. Selection API has no idea about ShadowDOM. Things don't work so well when selection crosses the boundary.
15:33:47 [Travis]
.. window.getSelection does different things depending on browsers, and things are somewhat inconsistent.
15:34:30 [Travis]
.. we need to add some info to selection API so it knows what to do in these cases.
15:34:49 [Travis]
.. note: getRangeAt returns a Range which has to be in one tree.
15:35:05 [Travis]
.. BTW, had a big discussion on this last year. TAG reviewed and was OK with it.
15:35:15 [Travis]
.. Proposal: new API getComposedRange.
15:35:23 [Travis]
.. returns a StaticRange.
15:35:43 [Travis]
.. takes options: list of shadow roots
15:35:52 [Travis]
.. (so that it knows that the author knows about them)
15:36:45 [Travis]
.. another option: selection root. (Enables easy to scope scenarios)
15:37:08 [Travis]
.. Proposal pt. 2. Other stuff in the Selection API that needs to be rationalized with the new changes.
15:37:49 [Travis]
.. define a "true range". Platform will know the real end-points, and can adapt what it returns to conform.
15:38:34 [Travis]
.. other APIs (setBaseAndExtent) can be adjusted to accept Nodes from different trees.
15:38:40 [Travis]
.. (we hope that will be web-compatible)
15:39:03 [Travis]
.. Presentation includes a few follow-up links at the end.
15:39:38 [Travis]
Travis: what is desired from this group?
15:40:02 [Travis]
masonf: Editing WG has lots of good knowledge here. Would love your feedback.
15:40:22 [Travis]
.. chromium is interested in implementing.
15:40:39 [Travis]
.. also, if we have volunteers to write PRs, that would be awesome.
15:40:58 [Travis]
whsieh: The selection root, is it a convenience?
15:41:06 [Travis]
masonf: Yes, essentially.
15:41:51 [Travis]
.. must pass in (at least) your own ShadowRoot. But also, you may want to "chop off" parts of the range out of your component. So it can handle both cases.
15:42:28 [Travis]
whsieh: Selection is scoped to editable regions (when it starts in an editing range)...
15:42:35 [Travis]
masonf: I believe "it depends".
15:43:11 [Travis]
whsieh: Silly little demo: http://whsieh.github.io/examples/contenteditable
15:43:27 [Travis]
.. can't seem to make the selection cross boundaries.
15:44:04 [Travis]
Megan: can select outside-in, but not vice-versa.
15:44:34 [Travis]
smaug: In Firefox, highlight can be partial.
15:44:45 [Travis]
snianu: Isn't that a problem with execCommands?
15:45:16 [Travis]
.. e.g., delete? I guess there must be smarts to find the deletable content.
15:45:27 [Travis]
smaug: How does that work in other browsers?
15:45:59 [Travis]
snianu: Just the whole editing sub-component is selected (no partial selection inside) so we side-step the problem.
15:46:18 [Travis]
.. behavior was different in old Edge/IE
15:46:26 [Travis]
.. (Travis didn't catch the full details)
15:46:47 [Travis]
.. the algorithm for adjusting the DOM is complicated.
15:47:37 [Travis]
whsieh: if selection contains any non-editable ranges, then the entire thing is non-editable (presumed Firefox behavior).
15:49:18 [Travis]
masonf: So is the implication that the selection root isn't necessary because it doesn't happen in practice?
15:49:56 [Travis]
whsieh: The case for scoping to editable roots is a less interesting case (because all browsers already do that). There are other use cases, perhaps, where it would be useful.
15:50:25 [Travis]
.. e.g., scoping to certain regions in an editor?
15:51:24 [Travis]
Megan: Why StaticRange?
15:51:52 [Travis]
masonf: from my POV, it was "Live Ranges" are icky.
15:52:16 [Travis]
smaug: I don't think Live Ranges can have selections between different trees. This may be why.
15:52:28 [Travis]
masonf: Was looking for that, but didn't find that restriction..?
15:52:44 [Travis]
smaug: Well, Static Ranges may also be limited -- that part of the spec may have to change.
15:52:58 [Travis]
whsieh: Another motivator is Performance.
15:53:43 [Travis]
smaug: Depending on implementation, Perf may not be that significant (internal mechanism may not be able to avoid tracking logic used in live ranges)
15:53:59 [Travis]
whsieh: As the number of live regions scale up, you could be in perf trouble.
15:54:23 [Travis]
megan: anything we'll loose by not having live ranges?
15:55:07 [Travis]
masonf: TAG said let's deprecate the old getRangeAt... but there were some unique use cases that would be lost.
15:55:14 [Travis]
.. we're not losing anything by having both.
15:56:29 [Travis]
masonf: Please file comments/feedback in the related issue (linked from the end of the slide).
15:58:21 [Travis]
zakim, please end the meeting
15:58:21 [Zakim]
As of this point the attendees have been masonf, Travis, comandeer, dandclark, snianu, smaug
15:58:23 [Zakim]
RRSAgent, please draft minutes v2
15:58:24 [RRSAgent]
I have made the request to generate https://www.w3.org/2022/08/11-editing-minutes.html Zakim
15:58:27 [Zakim]
I am happy to have been of service, Travis; please remember to excuse RRSAgent. Goodbye
15:58:31 [Zakim]
Zakim has left #editing
15:58:48 [Travis]
rrsagent, make logs public
16:00:28 [masonf]
masonf has left #editing
16:01:51 [jamesn]
jamesn has joined #editing
16:02:51 [Travis]
regrets: johanneswilm
16:03:05 [Travis]
present: whsieh
16:03:12 [Travis]
present: Megan
16:03:22 [Travis]
rrsagent, draft the minutes
16:03:22 [RRSAgent]
I have made the request to generate https://www.w3.org/2022/08/11-editing-minutes.html Travis
16:05:12 [Travis]
present: Megan, whsieh, alexk, comandeer, dandclark, smaug, snianu, Travis, masonf
16:05:27 [Travis]
chair: Travis
16:05:40 [Travis]
rrsagent, draft the minutes
16:05:40 [RRSAgent]
I have made the request to generate https://www.w3.org/2022/08/11-editing-minutes.html Travis