Comment 134 for bug 134813

Revision history for this message
In , Cristian Klein (cristiklein) wrote :

(In reply to comment #64)
> We're getting close but not quite there yet :-)
>
> + var node = e.rangeParent;
> + var offset = e.rangeOffset;
> + words.push(node.data);
>
> You're relying on the fact that the textarea breaks up each line into
> independent text nodes. That's not guaranteed, and in fact we're likely to
> change this soon. Here, you really should use 'offset' and check that the
> characters at 'offset' are the word you're expecting. Make sense?

Yes. Deep down inside I was afraid you might say that. :)