Touch events are not firing on inputs iOS8 standalone web app - javascript

In a standalone web-app launched from homescreen, on iOS 8.1(8.0),
touch events (touchstart, touchmove, touchend) are not firing on inputs/textareas, but on the same device in Safari they are.
I've tested the same web-app on iOS 6 and everything works as expected.
Has anyone encountered the same problem and found workaround for this issue?
Maybe there is official bug report? Unfortunately, I've found nothing on this subject.

Seems that touchevents in a standalone web-apps launched from homescreeen are back with iOS 8.1.3
:-)

Related

CodenameOne issue handling mouse events on iOS 12 and 13 in BrowserComponent

I am testing my CodenameOne app on the iOS simulator.
It is good practice to test on the main iOS versions.
My app has a BrowserComponent as main interface, where a list of Frames is displayed.
Text inside the frames is not selectable. This is ensured by means of
iframe.style.pointerEvents="none";
Mouse events are managed to address single press and long press. It is accomplished by means of detecting the events
"touchstart"
and
"touchend"
and computing the time interval. Javascript callbacks are used.
(also "touchmove" is detected to cancel some events so just "pure" touches are detected)
This works fine in the CN1 simulator, Android devices, and
on iOS simulator with iOS 10, iOS 11, iOS 14
but
it does not work on
iOS 12. iOS 13
What happens is that the mouse events are consumed by the BrowserComponent in such a way that the selection handles appear and the text is selectable.
I had to reinvent the wheel because I am using this CN1 cross-platform tool.
There is also an opened issue:
https://github.com/codenameone/CodenameOne/issues/3378
it is why I am not using "mousedown" and "mouseup" events. But it is not bad to use "touch" events on mobile devices.
(Furthermore I have to say that those "touch" events are useful also in the SwiftUI version, that uses WKWebView, to manage the mouse events as my app needs. It is because I have to use the same Javascript code in both apps.
But there is not the "selection handles appearing" issue with WKWebView. It is only tested on iOS 14, so I cannot say more about that.)
Now it does not work on iOS 12, 13.
I have a SwiftUI version of my app for iOS 14. So the CN1 version was mainly intended for older versions. If iOS 12 and 13 are "gone", it is not useful to publish it just for iOS 9,10,11, I think.
What's wrong with iOS 12, 13 with CN1? Has it special issues with some major changes in those OS versions that were not addressed?
If it is fault of the flaky BrowserComponent on the iOS simulator, it also has to be considered that the mouse events handling works on iOS 14, 11, 10.
So will it be flaky also on the real devices?
How to solve the issue?

Scrolling differences on Safari and Chrome (iOS) can you test for them?

It used to be (before iOS 8) that Safari couldn't natively animate on scroll, you had to stop scrolling to see the animations. Safari solved that issue, but when accessing the same website on Chrome (running in iOS) the issue persists. I read that chrome hasn't yet updated this on iOS. I know that it works great on Android... so... Is there a way to test for this "feature" either with modernizr or other js? I would like to disable animations on scroll if they are not supported. I've been able to accomplish this by checking which browser the user is using, but it would be easier if I could just check whether the functionality is available.
Before iOS 8, iOS would pause painting while the user was scrolling. This behavior was discontinued for applications using WKWebView but remains for browsers using UIWebView — this is why you only see the old behavior for certain third-party applications.
One approach is to detect whether your page is loaded inside WKWebView or not. An answer to another question suggests testing for indexedDB support. indexedDB is the only HTML5 feature difference between the WKWebView and UIWebView.
The snippet from the other answer suggests how to do this:
if (navigator.platform.substr(0,2) === 'iP'){
//iOS (iPhone, iPod or iPad)
if (window.indexedDB) {
//WKWebView
}
}

Web-app on iOS8 doesn't transfer Touch events to iFrames

In a web-app, on iOS 8.1, touch events (touchstart, touchend, etc.) don't seems to be transferred to iFrames, but on the same device in Safari they are.
I tested the same web-app on iOS 7 and again, the touch events are transferred to the iFrame perfectly. So basically, the problem seems to be directly related to iOS 8.
Unfortunately, I didn't found any documentation on the subject.
Anyone have encounter the same problem, found a workaround or know if there is an official bug report?
Thanks

history.back() doesn't work in Safari on iOS

My app is based on AngularJS 1.2.3. The application is enabled as a web app for iOS. The app contains back buttons with onclick handlers with the following code
history.length && history.back()
I've also tried using history.go(-1) as well. Problem is, the browser doesn't navigate back in history in Safari on iOS, or when the app is saved to the home screen as a web app. One thing i find weird however is that it works fine in Chrome on Safari, as Chrome actually is the Safari browser engine.
I know it have worked before, but doesn't anymore for some reason. The iPad is running iOS 7.0.4.
If you are using AppCache history.back will not work on iOS7 (check http://www.sencha.com/blog/the-html5-scorecard-the-good-the-bad-and-the-ugly-in-ios7/).
So if that's the problem, the easiest solution is to disable AppCache.

Touch events available in Safari?

A friend and I were discussing Mozilla's latest touch support and got on the question of what Safari provides for this. Searches seem to turn up nothing.
Do you know of anything that provides touch events to Safari on desktop, either via multitouch trackpad or direct screen interaction (I guess a Windows multitouch environment would be the only relevant case here.)?
No, there is currently no support for touch events in the desktop version of Safari.
According to this documentation it is only supported on iOS 2.0 or later.

Categories

Resources