Bug 118918 - getSelection returns plain text instead of a Range object
Summary: getSelection returns plain text instead of a Range object
Status: RESOLVED DUPLICATE of bug 174637
Alias: None
Product: konqueror
Classification: Applications
Component: khtml ecma (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-23 20:15 UTC by Kae Verens
Modified: 2009-05-05 16:55 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kae Verens 2005-12-23 20:15:11 UTC
Version:            (using KDE KDE 3.5.0)
Installed from:    Compiled From Sources

I've described this as a "wish", as kjs isn't actually breaking any standards by returning plain text with getSelection().

However, I believe it is very important to change the return type to a Range.

This would allow scripts to know not just the text that was selected, but also the location of the selection, which is needed for writing a rich text editor, for example.
Comment 1 Marijn Schouten 2006-04-18 14:32:17 UTC
Someone knowledgeable should comment on this. It seems simple to fix.
Comment 2 And Clover 2007-11-06 17:58:36 UTC
document.getSelection() should continue to return a string, as it does in Netscape 4, Mozilla etc.

It's window.getSelection() that returns a selection object, if Mozilla is to be followed (and it would be helpful to have the functionality). Docs at http://developer.mozilla.org/en/docs/DOM:Selection , minimal functionality is rangeCount and getRangeAt().
Comment 3 Maksim Orlovich 2009-05-05 16:55:02 UTC

*** This bug has been marked as a duplicate of bug 174637 ***