[TIMOB-9437] Android:Webview:'Click' event is not recognized after scaling(zoom-in or zoom-out) or double click.
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Low |
| Status | Closed |
| Resolution | Cannot Reproduce |
| Resolution Date | 2017-07-05T17:38:07.000+0000 |
| Affected Version/s | Release 2.1.0, Release 3.1.0 |
| Fix Version/s | n/a |
| Components | Android |
| Labels | api, qe-and060112 |
| Reporter | Shyam Bhadauria |
| Assignee | Eric Merriman |
| Created | 2012-06-07T03:26:20.000+0000 |
| Updated | 2017-07-05T17:38:07.000+0000 |
Description
It a not a regression bug. It exists since 1.8.2.
Refer the code below
var win = Ti.UI.createWindow({
backgroundColor: 'white',
});
win.orientationModes = [Titanium.UI.PORTRAIT, Titanium.UI.LANDSCAPE_LEFT, Titanium.UI.LANDSCAPE_RIGHT];
var loremIpsum = "<html><body>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec " + "faucibus vulputate lorem ac suscipit. Ut sit amet felis a metus mollis egestas at ac erat. Sed nec " + "urna urna, nec posuere justo. Cras nec malesuada orci. Donec interdum, elit vel consequat lacinia, " + "dui est convallis sem, nec lobortis nibh magna ac metus. Morbi sapien tellus, aliquet in convallis " + "in, viverra sit amet justo. Cras vitae erat vitae erat blandit porttitor ac faucibus libero. Mauris " + "sollicitudin, risus sit amet luctus consequat, lectus lorem sagittis sapien, at eleifend eros felis " + "eu elit. Mauris ut nibh leo, vel tempus sem. Vestibulum ante ipsum primis in faucibus orci luctus " + "et ultrices posuere cubilia Curae; Suspendisse eu lacus at ligula venenatis vestibulum.</body></html>";
var webview = Ti.UI.createWebView();
webview.addEventListener('singletap', function(e) {
alert('singletap');
});
webview.addEventListener('swipe', function(e) {
alert('swipe');
});
webview.html = loremIpsum;
win.add(webview);
win.open();
Steps to reproduce
Test steps
1. Launch Application
2. Tap on the screen
3. Scale app,either zoom-in or zoom-out
4. Tap on the screen
Expected result
After Step 2: Get an alert "singletap"
After Step 3:
Android: Scrolls left and right
After Step 4: Get an alert "singletap"
Actual result
After Step 2: Get an alert "singletap"
After Step 3:
Android: Scrolls left and right
After Step 4: No alert "singletap" is seen.
Issue -> After the webview is scaled(either zoom in or zoom out by any means),it stops taking click event listeners.
Issue is reproduced with sdk versions 3.0.2 and 3.1.0 .
I am unable to reproduce this issue with the following environment; Pixel (7.1) Studio 4.9.0.201705302345 Ti SDK 6.1.1 GA Appc NPM 4.2.9 Appc CLI 6.2.2 Ti CLI 5.0.14 Alloy 1.9.11 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131