Skuzzzy / rikaikun

Automatically exported from code.google.com/p/rikaikun
0 stars 0 forks source link

span after text in div first character not highlighted. #28

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
http://radiotime.com/WebTuner.aspx?StationId=97856&#

Hover over tokyoto for an example.

Original issue reported on code.google.com by melin...@gmail.com on 15 Jan 2010 at 2:17

GoogleCodeExporter commented 9 years ago
I can't find 東京都 in that page. Do you have any other example?
I know that this happens because I've had the same problem before, but I can't 
think of an example of a page where it happens.

A minimal html code exemplifying the "span after text in div" would also work. 
I'm sorry but I'm not sure what you mean.

Original comment by sepha...@gmail.com on 24 Apr 2013 at 11:36

GoogleCodeExporter commented 9 years ago
Found this case in which the first character is not highlighted.
I wonder if it's the same problem.

<html><body>
<span><input type="checkbox" id="check"><label for="check">終日</label></span>
</body></html>

Original comment by sepha...@gmail.com on 18 Sep 2013 at 4:28

GoogleCodeExporter commented 9 years ago
yeah that page no longer shows the example but there are several duplicates of 
the bug in the issue tracker.  The minimal test case you gave and basically any 
of the "doesn't recognize after styled text." Some of the common instances 
don't happen anymore so maybe newer versions of chrome are better.

These cases are hard to fix because they're all basically special cases to 
account for a bug in webkit.  It looks like there's probably some bitrot in the 
sense that some cases solved for in the code are no longer needed and others 
aren't addressed.

Original comment by melin...@gmail.com on 18 Sep 2013 at 4:34

GoogleCodeExporter commented 9 years ago
melink14,

what has been the approach until now to work around that bug?

Original comment by sepha...@gmail.com on 18 Sep 2013 at 4:54

GoogleCodeExporter commented 9 years ago
Well, the bug is that the point returned by the browser is offset one or
two places so there's special logic to correct for the offset.

The logic for node boundaries is tricky and basically for every error you
have to see what rikaikun is seeing instead of the character creating a
rule for that case and then correcting for it in the code.

I'm on a tablet or I would give code pointers.  Let me know if you can't
find the logic.

Original comment by melin...@gmail.com on 18 Sep 2013 at 5:08