Rangy .expand Punctuation

24 views
Skip to first unread message

Ryan Doubleday

unread,
Oct 14, 2014, 11:06:59 AM10/14/14
to ra...@googlegroups.com
Using rangy to allow for easier text selection on a site for users. In short if I have the following (in HTML):

This is a line of text.
</br>
"Some quoted text"

The result of making a selection of "Some, snaps back to the period of the previous line. This seems to be true with all punctuation etc. Has anyone else ran into this and how did they get around it?

Casey Childers

unread,
Oct 14, 2014, 7:26:00 PM10/14/14
to ra...@googlegroups.com

I have not seen this issue myself, can you tell me if the selection is including the period or is it falling between your period and break tag? You may want to look into inserting an "invisible space" between the punctuation and next element, or specifically locate the element and force your start to after the node that falls after the punctuation. Also further test to check if this issue is specifically related to the br or hr tags (self closing tags). I may be able to provide you with some assistance, though if the issue is more complex then walking you through a fix, I charge $25/hour, and I haven't found an issue on the internet I cant fix, so let me know, I may be able to solve your issue free of charge provided I can duplicate it.

--
You received this message because you are subscribed to the Google Groups "rangy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rangy+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages