Bug 13860 - Can't use selection.modify() to move/extend a non-editable selection
Summary: Can't use selection.modify() to move/extend a non-editable selection
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 523.x (Safari 3)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: http://just1gb.googlepages.com/select...
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-24 10:25 PDT by Sridhar Gurivireddy
Modified: 2007-10-05 04:58 PDT (History)
1 user (show)

See Also:


Attachments
Test file (2.68 KB, text/html)
2007-05-29 11:12 PDT, Sridhar Gurivireddy
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sridhar Gurivireddy 2007-05-24 10:25:26 PDT
selection.modify() does not work when "move" is specified as first argument.

var selection = window.getSelection();
selection.modify("move", "forward", "sentence");

This works in Firefox
Comment 1 Justin Garcia 2007-05-24 11:19:08 PDT
Selection::modify is Safari only, FF doesn't support it afaict.  I'm not sure why you'd be having problems with selection.modify("move", "forward", "sentence"), can you include the entire test case?
Comment 2 Sridhar Gurivireddy 2007-05-29 11:12:19 PDT
Created attachment 14769 [details]
Test file

Please use the attached file
Comment 3 Justin Garcia 2007-05-30 16:38:53 PDT
I see.  The test tries to modify a non-editable selection.
Comment 4 Alexey Proskuryakov 2007-10-05 04:58:06 PDT
Marking confirmed per the above comment (there doesn't seem to be any reason to restrict selection.modify() to editable content).