JQueryMobile swipe on Android KitKat is unreliable due to WebView behaviour. Anyone got a fix/workaround?

// Expert user has replied.
A Andrew Haigh 3 years 7 months ago
4 2 0

Hi,
We were working on a nice swipe-to-navigate UI on RhoMobile 5, but ran into an Android WebView problem on KitKat which prevents swipe touch events being processed:

Details are as noted here, but essentially it means only 5% of touch swipe events register on KitKat devices (iOS and older droids are fine):
https://github.com/jquery/jquery-mobile/issues/5534#issuecomment-413879…

Does anyone know of a convenient workaround for KitKat devices? (Yes I know jqm or android communities is probably a better place to ask, but this is a long shot, and I am using Rho5 after all )

Thanks,
Andrew Haigh

Please Register or Login to post a reply

2 Replies

R Robert Galvin

What about just building for API 18 instead of API 19, so you don't get the new WebView Control?

Here is some info on the new control that may be helpful:

Migrating to WebView in Android 4.4 | Android Developers

J Jon Tara

Browsers are a moving target. They are constantly being updated. It is difficult to impossible for libraries to support browsers that have not yet been released.

This is a particular problem for cross-browserJavascript UI libraries, like jQuery Mobile. They quickly go out of date. It's the opposite of a server, where software that works will (generally) continue to work, and so we are used to creating stable platforms that we don't rush to update.

The version of jQuery Mobile packaged with Rhodes is now quite out of date, and should not be expected to always work correctly with new browsers.

You can check jQuery Mobile Issues on GitHub for specific issues (search Issues and checkin comments), and take a look at release notes to see if there is anything specific for KitKat. But each release has many fixes for many browsers and support for many new browser versions.

In any case, you will have better luck supporting newer browsers with the latest jQuery Mobile, 1.4.4. However, it is a large change from 1.3 and so may not be very practical for an existing project. jQuery update policy is normally to provide incremental updates for the previous version, but I note that the last 1.4 incremental update (not sure, perhaps the past 2 updates) was NOT followed by a new 1.3 increment, so perhaps that policy is no longer being followed.

Unfortunately, this is the nature of the ever-changing world of browsers, and you will need to plan for this. If you have control of user devices, then this may impact device selection or selection of OS version.

I see in the link above, there is a "quirks" mode available, and so you may be able to build for API 19 while still retaining previous WebView behavior. See the article.

CONTACT
Can’t find what you’re looking for?