Created attachment 65255 [details] a repro. See an attached repro. it runs a test automatically. Expected: only text "Left" is selected. Actual: Both "Left" and "Right" are selected. ---- The bug is originally reported at http://crbug.com/39795.
WebKit assumes a floating element as a something like a inline, thus doesn't treat it need spacing between elements. See shouldEmitNewlinesBeforeAndAfterNode() in TextIterator.cpp.
I am able to reproduce this bug in Safari 16.1 and Chrome Canary 110, where both browsers select both "left" and "right" while Firefox only select "Left" as expected. Just wanted to highlight the latest behavior from attached testcase. Thanks!