Hi Kovid,
Using normalize() seems to help but ... calling normalize() on the anchorNode or its parent or even the entire document seems to clear/reset the cursor or highlighted region in BookView. My guess is the highlighted code is actually the part that is being normalized away. This same javascript routine is used to save the cursor position while editing in BookView and having your highlighted text randomly become unhighlighted makes things a bit tough.
I guess I could simply always return the parent node of the text field as the cursor position.
Any other advice?
KevinH
Quote:
Originally Posted by kovidgoyal
|