Kendo UI mobile ListView freezes after opening external link in native browser

In Kendo mobile list UI, a script is called to open an external link by its own browser when the link is clicked.

The PhoneGap script looks like this: On Android: navigator.app.loadUrl (link, {openExternal: true}); On iOS: window.open (link, '_system');

The link can be opened in an appropriate browser.

However, when the user switches back to the application from their native browser, some issues arise.

On Android, the screen hung on the original image, when the back button is pressed again, the screen does not freeze and can be refreshed.

On iOS, however, the screen also hangs on the original view. When you tap on the screen, the full view (with layout) moves. There is no way to turn off this screen.

How do I fix this so that the screen cannot be turned off after switching from native browser to app?

Many thanks for your help.

Updated 1:

I changed the original tag to tag, now everything works. But I'm still curious to know if these are definite bugs for Kendo UI Mobile.

+3


source to share


1 answer


There is a serious issue with Kendo Mobile completely freezing on the page, making the application completely unresponsive to touch / mouse. The offensive CSS is in Loader.transition (), which does this.container.css("pointer-events", "none")

, which is equivalent to:

document.body.style.pointerEvents = "none";

      

Oh - this is ugly. Plus _attachCapture has offensive JavaScript for all the mouse and touch events that do:

event.preventDefault();

      

Fatal when using an app with an embedded full page WebView / UIWebView (requires closing the app and restarting the app).



Damage can occur if:

  • You have an exception in your code (even in non-obvious places),
  • You are wrong when going (no exception, just hangs),
  • The user's browser does not fire the transitionEnd event as expected for some reason (this was repeated for one Chrome browser in the user's browser.
  • In the interaction mode between the page transition and the loader (depending on the time, cannot be repeated) there is a failure mode,
  • Several other reasons.

Note that there is a comment in Kendo that says "This should be cleaned up at some point (widget by widget) and refactored to widgets without relying on a full callback if no transition occurs." It's so clear that Telerik knows there is a problem.

You can use the following code during development to at least alert you when Kendo Mobile has turned around:

var transitionTimer;
kendo.mobile.ui.Loader.prototype.wasTransition = kendo.mobile.ui.Loader.prototype.transition;
kendo.mobile.ui.Loader.prototype.transition = function() {
    transitionTimer = setTimeout(function() {
        alert('Kendo has hung the page');
    }, 10000);
    this.wasTransition.apply(this, arguments);
}
kendo.mobile.ui.Loader.prototype.wasTransitionDone = kendo.mobile.ui.Loader.prototype.transitionDone;
kendo.mobile.ui.Loader.prototype.transitionDone = function() {
    clearTimeout(transitionTimer);
    this.wasTransitionDone.apply(this, arguments);
}

      

0


source







All Articles