Bug 61110 - TextIterator on Details&summary iterates characters in incorrect visual order
Summary: TextIterator on Details&summary iterates characters in incorrect visual order
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P3 Minor
Assignee: Hajime Morrita
URL: data:text/html,aaa <details open>bbb ...
Keywords: InRadar
Depends on:
Blocks: 252223 64072
  Show dependency treegraph
 
Reported: 2011-05-18 23:58 PDT by Kent Tamura
Modified: 2023-02-13 18:51 PST (History)
10 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Tamura 2011-05-18 23:58:41 PDT
1. Load data:text/html,aaa <details open>bbb <summary>ccc</summary> ddd</details> eee
2. Select all text (⌘-A / Ctrl-A)
3. Copy (⌘-C / Ctrl-C)
4. Paste on a plain text box

Expected:
 The pasted text should be "aaa ccc bbb ddd eee" because it's the visual order.

Actual result:
 The pated test is "aaa bbb ccc ddd eee".
Comment 1 Kent Tamura 2011-05-19 00:20:38 PDT
I don't think this is so severe.
Comment 2 Hajime Morrita 2011-12-05 00:11:45 PST
Reforming tree: Pushed this down to the flattened tree family.
Comment 3 Ahmad Saleem 2022-08-05 16:22:00 PDT
I am able to reproduce this bug in Safari 15.6 on macOS 12.5 using mentioned test case converted into JSFiddle:

Link - https://jsfiddle.net/yntdab40/show

Selecting any text and then doing CMD + A then CMD + C and then copying here shows this for Safari 15.6 and Firefox Nightly 105:

aaa
bbb 
ccc
ddd
eee

While for Chrome Canary 106, it shows this:

aaa
ccc
bbb dddeee
Comment 4 Radar WebKit Bug Importer 2022-08-05 18:41:09 PDT
<rdar://problem/98222614>
Comment 5 Ahmad Saleem 2022-08-09 15:05:18 PDT
*** Bug 61112 has been marked as a duplicate of this bug. ***