Offsets after Selector.modify() call differs between 2 different range creation sequence: 1. using setBaseAndExtent() 2. using setPosition() followed by modify("extend") Note both creation sequences result same offset pair(startOffset, endOffset). This can be problematic because this would make hard to restore selection programatically.
Created attachment 50379 [details] test case
This bug appears to have been fixed. morrita, do you have cycles to post a patch to add your test? If not, I'm going to do that tomorrow.
I am not able to reproduce this bug in Safari 16.1 and STP 158 and it shows "PASS", @rniwa - do you think adding test is still worth it? Thanks!
This is long fixed. No need to add a test at this point.