WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
263306
DOMSelection toString doesn't work with flex-direction:row
https://bugs.webkit.org/show_bug.cgi?id=263306
Summary
DOMSelection toString doesn't work with flex-direction:row
Morgan Redding
Reported
2023-10-17 23:48:16 PDT
When an element with "display:flex; flex-direction:row" is selected, selection.toString() inserts newlines between the child elements. Bug is on both Desktop and iOS Safari Safari Version: Version 17.0 (18616.1.27.111.22, 18616) Bug is not present in Chrome Repro steps: ``` myDiv.innerHTML = `<div style="display:flex; flex-direction:row;"><div>a</div><div>b</div></div>`; r = document.createRange(); r.setStartBefore(myDiv); r.setEndAfter(myDiv); sel = window.getSelection(); sel.removeAllRanges(); sel.addRange(r); sel.toString() ``` Expected: "ab" Actual: " a b "
Attachments
test
(344 bytes, text/html)
2023-10-18 14:52 PDT
,
Ryosuke Niwa
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2023-10-18 14:52:04 PDT
Created
attachment 468266
[details]
test As far as I've tested, Chrome 118.0.5993.70 as well as Firefox 118.0.2 both serializes this as "a\nb" with new line in between "a" and "b".
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug