[TIMOB-9591] Android: Webview: Having an event listener for click event of webview or any of its parent view does not allow web interaction with web view components
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2012-06-17T21:49:22.000+0000 |
Affected Version/s | Release 2.1.0 |
Fix Version/s | n/a |
Components | Android |
Labels | core, qe-and060112, regression |
Reporter | Satyam Sekhri |
Assignee | Neeraj Gupta |
Created | 2012-06-16T13:35:49.000+0000 |
Updated | 2017-03-09T23:30:18.000+0000 |
Description
If the application has the addeventlistener method for the click event for the webview or its parent view, then the web components (like links, web buttons etc.) on the web view do not work.
Regression. This does not happen in 2.0.2.
Steps to reproduce:
1. Create an application with code below
2. Launch the application
3. In the google web page that opens, click on any link
Actual: The link does not work. Instead it opens the options for text edit
Expected: The link should work normally
var win = Ti.UI.createWindow({
backgroundColor:'#000'
})
var webview=Ti.UI.createWebView({
url:'http://google.com',
});
webview.addEventListener('click', function(e){
//any event listener code
});
win.add(webview);
win.open();
This is probably caused by https://github.com/appcelerator/titanium_mobile/pull/2046. This is actually a consequence of us achieving parity with iOS. I have tested this in both iOS and Android in master, and both have the same behavior. Also, in the docs, we specify this behavior: "The native web view handles scrolling and other related touch events internally. If you add event listeners for any of the standard touch events (touchstart, click, and so on), these events do not reach the native web view, and the user will not be able to scroll, zoom, click on links, and so on." http://docs.appcelerator.com/titanium/2.0/#!/api/Titanium.UI.WebView
Closing ticket as invalid.