Fix for setSelection( htmlDocument().createRange() )

Leo Savernik l.savernik at aon.at
Fri Nov 5 11:31:06 GMT 2004


Am Freitag, 5. November 2004 10:40 schrieb David Faure:
[...]
> > Should this not be
> >
> > if ( r.startContainer() == r.endContainer() &&
> >    r.startOffset() == r.endOffset() )
> >
> > so that _any_ empty range clears the selection?
>
> No, an empty range is not the same as no selection.
> An empty range is what happens when you start clicking on the document:
> initially the range is empty, but the start point is set, and you can
> extend the selection with the mouse. [...]

For caret mode, I basically elided the notion of "no selection", so that an 
empty range indeed conincides with "no selection" (put another way: there's 
always a caret position, even if it doesn't blink). I'd like to keep it that 
way.

mfg
 Leo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20041105/bfd18e58/attachment.sig>


More information about the kfm-devel mailing list