Bug 35960 - Selector.modify() behaves differently with same selection range from different creation sequence
Summary: Selector.modify() behaves differently with same selection range from differen...
Status: RESOLVED LATER
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-10 01:13 PST by Hajime Morrita
Modified: 2022-11-22 17:54 PST (History)
3 users (show)

See Also:


Attachments
test case (1.36 KB, text/html)
2010-03-10 01:15 PST, Hajime Morrita
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hajime Morrita 2010-03-10 01:13:37 PST
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.
Comment 1 Hajime Morrita 2010-03-10 01:15:59 PST
Created attachment 50379 [details]
test case
Comment 2 Ryosuke Niwa 2012-05-02 23:27:56 PDT
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.
Comment 3 Ahmad Saleem 2022-11-22 02:27:02 PST
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!
Comment 4 Ryosuke Niwa 2022-11-22 17:54:56 PST
This is long fixed. No need to add a test at this point.