You are not logged in.

1

Friday, June 4th 2004, 6:24pm

[Konqueror browser] getSelection() returns a string instead of Selection object

I hope anyone can shed any light on this and this is the right forum to post this issue in.

I am trying to create a DOM Range object based off a user's selection.

In Mozilla I can easily do this using: window.getSelection().getRangeAt(0)
In IE I can do document.selection.createRange();

However, in Konqueror(3.2.2) document.getSelection() returns a string instead of a Selection object and window.getSelection() doesn't work at all.

I know that the KHTML function KHTMLPart::selection() returns a DOM::Range object
(http://developer.kde.org/documentation/l….html#selection)

The question is, is this function somehow exposed through JavaScript?

If not, does anyone know of a workaround for the problem?

Thanks in advance to anyone who can point me in the right direction.

Nick

Hille

Beginner

Posts: 4

Location: Paderborn

Occupation: Student

  • Send private message

2

Monday, June 7th 2004, 3:31pm

RE: [Konqueror browser] getSelection() returns a string instead of Selection object

hmm..

perhaps it's a bug. You should report it to the KDE team.

bye

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

3

Monday, June 7th 2004, 4:09pm

Nick already posted to kfm-devel, but unfortunately nobody has answered yet.

Cheers,
_
Qt/KDE Developer
Debian User