$.mobile.path operations broken in Android 4.4 #6810
Comments
|
I don't get it. This works just fine for me: https://www.youtube.com/watch?v=bmbmr1-h3v0 What am I doing wrong? |
|
OK, the previous video was using version 1.3.x. Here's another with version git. I still don't get what's wrong. Could it be that Google has rolled out an update that fixes the problem? |
|
@mnaughto Can you please verify that this is still a problem? We've tried to duplicate this with both emulators and actual Android 4.4 devices and the problem seems to have been fixed by Google. I'd imagine so, since it's a glaringly large error on their part. |
|
I can verify that fix #7237 resolves the similar issue I was seeing with paths on Android WebView 4.4 (see http://stackoverflow.com/a/21854149/1028489 for the original issue description). Although I do not use Google's WebView 4.4 handles custom schemes and @gabrielschulhof , I do not believe Google has fixed/changed anything since the 4.4 update. |
|
OK, so this is with custom schemes. Gotcha! |
|
@mrodalgaard I'm still not seeing this problem, at least not with the Android Emulator running version 4.4.2 of Android. Maybe it only happens in 4.4.0 (for which I can't seem to be able to set up any AVDs). |
|
I have not tried it on the emulator, but I am almost sure it behaves the same. I have seen the path issue on both 4.4.0 and 4.4.2 on a Nexus 7 device. It's quite a complex test setup with custom schemes. Are you trying with If I have the time, I will build a minimal Android project that can reproduce it. |
|
@mrodalgaard so, I guess the problem is present on 4.4, but not on 4.4.2. Can you please give the exact Android version number of the device/AVD where you've seen the problem? |
|
@mrodalgaard if you could create an apk that I can install to reproduce the problem, we'd be eternally grateful :) |
|
@mrodalgaard I've created a webapp with Cordova and I've run it on 4.4.2. It doesn't show the problem either with file:// or with http://. |
|
I created a plain Java app that displays a WebView and allows you to enter any URL and I also can't reproduce the problem with either http:// or file:// ... |
|
I'm going to close this issue because I cannot reproduce it, however, I'll keep the browser tab open, in case @mrodalgaard gets the time to create an app that /can/ reproduce this problem. |
Several of the operations in $.mobile.path may not perform as expected because of changes to how window.location fields are populated in the WebView of Android 4.4.
In versions < 4.4, window.location.host contains a string such as "www.myplace.com", and window.location.pathname contains something like "/admin/index.html".
However, in 4.4, this appears to change so that window.location.host is an empty string and window.location.pathname contains something like "//www.myplace.com/admin/index.html".
This discrepancy can be observed by loading http://jsbin.com/esOzuPUK/1/ in a WebView in an emulator running 4.3 and an emulator running 4.4.
This bug, at the very least, affects the output of $.mobile.path.getLocation(). However, though I'm not sure why, it also seems to be causing the bug described in #6746.
The text was updated successfully, but these errors were encountered: