naoak / WebViewMarker

Support library for text selection on Android WebView. (forked from BTAndroidWebViewSelection)
MIT License
62 stars 24 forks source link

caretRangeFromPoint null #8

Closed liufsd closed 9 years ago

liufsd commented 9 years ago

if i set my device language to France or other.

 var range = document.caretRangeFromPoint(android.selection.lastTouchPoint.x, android.selection.lastTouchPoint.y);

range will be return null ,what's wrong? It only work on english device success. Thanks.

liufsd commented 9 years ago

But https://github.com/btate/BTAndroidWebViewSelection work success, What's the different ?

liufsd commented 9 years ago

got it

 String startTouchUrl = String.format(Locale.US, "javascript:android.selection.startTouch(%f, %f);",
                    xPoint, yPoint);
naoak commented 9 years ago

LTNS. This issue was fixed by #6. Will be work on v0.1.3.

naoak commented 9 years ago

If you still have any problems, reopen this.