-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expand the side menus crash the app on Android 2.3.7 #780
Comments
Wow, hmm. Looks like an issue with Angular almost. Thanks for the report. Which Android device specifically are on, just curious? |
This is a Genymotion virtual device, emulate Android 2.3.7 as a Nexus One. |
Any plan to deal with crash on Android 2.3.7? Everything works just fine but the crash would prevent us from releaseing app for Android 2.3.7 user? |
@phuongnd08 is this still an issue? |
I found out that font icons, which are assigned within an |
I'm upgrading ionic to 1.0.0-beta2 and the left-buttons is not showing. I used to do this: |
Yes quite a bit has changed, but in the end the changes have been made so it's easier to develop: |
I'm trying to use %ion-header-bar: %ion-view
%ion-header-bar
.buttons
%button.button.button-positive(ng-click="sideMenuController.toggleLeft()")
%h1.title Introduction
%ion-content(has-header="true" has-tabs="true") But it looks obvious to me that %ion-view will ignore %ion-header-bar. If I set title to %ion-view, I get the title in the view. But how to add the buttons? |
http://ionicframework.com/docs/api/directive/ionNavButtons/ Happy to help, but it'd be better to use the forum to answer any development questions like these, thanks. |
Well, I think this is related to verify the issue itself, since I'm trying out the new version to check for issue existence. Btw, on Android 2.3.7, Web View is complaining about this kind of syntax: $attr.$set('class', ($attr.class || '') + ' button icon button-icon', true);
|
@adamdbradley Thanks for pointing out how to render left buttons. I commented all the troublesome lines of ionic-angular.js and the app is rendering now. But as soon as I try to toggle the left side menu, the app (browser) crash. |
I tried with nightly-1897 and does not encounter the syntax issue any more.
There was no sign of angular js error anymore. |
FYI, I upgraded |
@adamdbradley @mlynch So this issue should be reopened, no? |
After searching around, it seem that Android 2.3.7 browser would crash if it encounter -webkit-transition. https://code.google.com/p/android-x86/issues/detail?id=445&sort=-id I'm thinking about a way to disable -webkit-transition if the app happen to run on Android < 2.3.7 |
I'll keep this open for now - when we switch to the new animation system, thisAndroid 2.x problem may actually fix itself. |
Awesome. Meanwhile, I use a piece of javascript to check if browser is on Android 2.3 or lower, if yes then add a css selector that turn off all transition effect: var ua = navigator.userAgent;
if( ua.indexOf("Android") >= 0 )
{
var androidversion = parseFloat(ua.slice(ua.indexOf("Android")+8));
if (androidversion <= 2.3)
{
document.write("<style type='text/css'> * { transition: none!important; -webkit-transition: none!important; } </style>")
}
} |
@phuongnd08 Great find, thanks! I added a pure CSS fix so it disables transitions on Android 2. I was able to replicate Android 2.3.7 with side menus crashing without the fix, and not crashing with the fix. Also, for those who still want to have Android 2 transitions they can add |
I'm having this issue on 2.3.7 (same geymotion vm as OP), but not on a real HTC Desire with cyanogenmod 2.3.3. I'm going to try the CSS fix and will let you know how it goes. |
It works with JS version of the CSS fix. I used the following syntax due to JSHint complaining about var ua = navigator.userAgent;
if( ua.indexOf("Android") >= 0 )
{
var androidversion = parseFloat(ua.slice(ua.indexOf("Android")+8));
if (androidversion <= 2.3)
{
var newScript = document.createElement("style");
var content = document.createTextNode("* { transition: none!important; -webkit-transition: none!important; }");
newScript.appendChild(content);
var bodyClass = document.getElementsByTagName("head")[0];
bodyClass.insertBefore(newScript, bodyClass.childNodes[2]);
}
} |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
So I have the side menus:
When I try to expand it:
The side menu works fine on android 4.1.1, but crashes on android 2.3.3
The text was updated successfully, but these errors were encountered: