Closed gibson042 closed 2 weeks ago
Thanks! I don't like that the whitespace is included even if just copying a single line, though, as one does fairly often when writing an implementation which closely adheres to the spec text. I'm a bit hesitant to mess with the copy
event, but it's probably appropriate here.
OK, that makes sense. Done.
I think that logic is broken in Chrome and Safari, which give slightly different selection ranges when triple-clicking.
I can try to fix it later if you haven't gotten to it first.
@bakkot Updated; please retest and let me know about any issues you encounter.
Looks like it works for steps with substeps, but not steps without. Specifically, triple-clicking on the "This is an out-of-bounds state" line in the docs ends up with the following tree structure in domRoot
, which doesn't trigger the conditions you're checking for:
Thanks for the detail. Fixed.
This results in better copied text, e.g.
rather than