I am seeing an annoying bug in WebView on the G1. I have a WebView that displays an HTML page. When the user clicks on a link, the link's text is highlighted.
At this point, I call WebView.clearView(), and then WebView.loadDataWithBaseURL() to load the URL that the user has just clicked on. When the new page finally shows, the WebView somehow still remembers the previous highlight area. If the user clicks on the WebView again, a "phantom highlight" at the old location will flash quickly. The phantom highlight also appears when the user moves the trackball. There are other cases where this bug would appear. For example, if you use JavaScript to make portions of the page visible/hidden (using STYLE:display='none', etc), and then the user moves the trackball, wrong areas of the page will be highlighted. I have a work-around: if the WebView's scrollX == 0, I send a faked touch up/down event at position (0,0). This would have the effect of cancelling the highlights (because I know tbe webview's margin is 8 pixels so there's nothing clickable at 0,0). I didn't think because I couldn't find an proper API for clearing the highlight. Still, I wonder if this has been fixed in cupcake. Thx! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---