[TIMOB-2017] Android: WebView No Longer Fires Click Event
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-04-23T12:58:38.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0, Release 2.1.0, Sprint 2012-08 |
Components | Android |
Labels | android, api, defect, module_webview, qe-testadded, regression |
Reporter | Don Thorp |
Assignee | Ping Wang |
Created | 2011-04-15T03:08:13.000+0000 |
Updated | 2012-08-23T18:06:46.000+0000 |
Description
Bill triaged the problem.
In April you added this code to disallow registering for touch on the WebView:
http://github.com/appcelerator/titanium_mobile/commit/d47e4e06456d033af0eede50469633054bfc65cc#L1R149"> http://github.com/appcelerator/titanium_mobile/commit/d47e4e06456d0...
I'm going to mark this as a regression since I didn't comment on the commit well enough to know if I disabled it on purpose. Will need to check interference with clickable items in a webview and scrolling.
Attachments
File | Date | Size |
---|---|---|
app.js | 2011-04-15T03:08:14.000+0000 | 1194 |
index.html | 2011-04-15T03:08:14.000+0000 | 774 |
i'm working on tests for this
It seems fine to me with clicking enabled. Before I commit and set to fixed-in-qa, can you (don) please look at see if this video shows me testing enough stuff? (my test files are attached in case you want to look at them.)
Video:
http://screencast.com/t/HBfiMexSS">http://screencast.com/t/HBfiMexSS
(from [dcc312507064f1a53a2ff05919b85817c8f61aac]) [#2017 state:fixed-in-qa] Re-enable touch for WebView. It had been deliberately disallowed but tests with it enabled don't show any problems, and with it enabled we can again have the click event. http://github.com/appcelerator/titanium_mobile/commit/dcc312507064f1a53a2ff05919b85817c8f61aac"> http://github.com/appcelerator/titanium_mobile/commit/dcc312507064f...
(from [bad260939ab664f3777fb3239400ae266f8cc437]) [#2017 state:fixed-in-qa] Re-enable touch for WebView. It had been deliberately disallowed but tests with it enabled don't show any problems, and with it enabled we can again have the click event. http://github.com/appcelerator/titanium_mobile/commit/bad260939ab664f3777fb3239400ae266f8cc437"> http://github.com/appcelerator/titanium_mobile/commit/bad260939ab66...
1.5.0.02c264 g1 1.6 and 2.2 sim
Behavior still occurs from 1.6.2 (earliest available) - 2.0.0. WebViews do not fire click events. Works in iOS. SDK: 1.8.2 githash=59b3a90s, 2.0.0.v20120314120250 Android: V8, Rhino Studio: 2.0.0.201203121914 OS: Snow Leopard Devices Tested: GSlate 3.1, Galaxy Nexus 4.0.2 Steps to Reproduce: 1. Run code, click web view.
Expected Result: click should fire an alert Actual Result: no alert, no click event
PR https://github.com/appcelerator/titanium_mobile/pull/2027
Commit https://github.com/appcelerator/titanium_mobile/commit/5b5b8f13800ee9d8ab279342a53fb9f8686d1e06 s seems to have broken onclick handlers for tags within html content in Ti.UI.WebView. I have html content containing tags like these:
This works for SDK 2.0.1 GA (and 1.8.2) but fails for continurous build 2.1.0.v20120418184403. In SDK 2.0.1 GA tap on a link fires the the onclick handler as expected In SDK 2.1.0.v20120418184403 tap on a link leads to a text select action Tested on emulator with android 4.0.3. This issue should be reopened! Regards Dietrich
Hi Dietrich, can you provide the whole test case? BTW, do you test it on iOS? Does iOS give you a different behavior than Android? Thanks.
@Ping Wang: In IOS this works as expected and no difference between SDK 2.0.1 GA and SDK 2.1.0.v20120418184403. Here we go with the test case:
Steps for functional test: 1) Run the test case below. Click the webview and the alert should show. 2) Comment out "webView.addEventListener(...)" and run the test case again. Click any link in the webview. It should open the link and no alert shows.
Closing as Fixed. Verified via Ping's test code. SDK: 2.1.0.v20120613210250 Studio: 2.1.0.201206131907 OS: Snow Leopard Devices Tested: Android Emulator 2.3.3, Nexus One 2.2.2, Nexus S 4.0.4 Android Runtime: V8, Rhino