0

my question is related to this one: http://stackoverflow.com/questions/6240139/highlight-text-range-using-javascript I've used accepted answer from there, but highlight seems shifted a few points left.

Here is my example:

http://jsfiddle.net/8mdX4/653/

, I expected a word 'sit' to be highlighted, but it's not. Could someone explain why is that, please?

  • Which browser do you test on? In FF26 the programmed highlight is placed exactly to the same place as user selection will appear. – Teemu Feb 05 '14 at 12:06
  • I've tested on Chrome v.32.0.1700.107m and Mozilla Firefox v.16.0.1 and I'm having this same problem on both. Btw I need this to work in Android WebView, resp. in Chrome. – Luboš Staráček Feb 05 '14 at 12:15
  • I also have the problem in chrome. It looks like the script forgets the first 6 characters. Here a example: http://jsfiddle.net/8mdX4/674/ – Arno Feb 05 '14 at 12:42

0 Answers0