Sencha Touch 2.2.x and Google Chrome 29

There’s a bug in Google Chrome 29 that prevents Sencha Touch 2.2.x apps from displaying properly. While this shouldn’t affect mobile browsers (yet), it will affect you if you use Chrome to debug your apps.

You can patch your Sencha Touch 2.2.x apps by modifying the /touch2/resources/themes/stylesheets/sencha-touch/base/mixins/_Class.scss file, replacing the st-box mixin with the following code:

@mixin st-box($important: no) {
    @if $important == important {
        display: flex !important;
        display: -webkit-box !important;
        display: -ms-flexbox !important;
    } @else {
        display: flex;
        display: -webkit-box;
        display: -ms-flexbox;
    }
}

16 thoughts on “Sencha Touch 2.2.x and Google Chrome 29

  1. Pingback: Touch 2.2.x is broken in Chrome 29 | What Is ExtJS

  2. emalcdo

    thank you for this, I had a great weekend and then when I returned from my desk and view it in chrome flex layouts are collapsed, chrome should have opted to degrade gracefully on css attribute hierarchy

    Reply
  3. wagsmax

    I thought the sky had fallen. I was about to do something really nasty to my server, when I found this post. Thank you! Now the real question is, will Google fix the bug, or will Sencha address this, or will we have to continue to patch our apps?

    Reply
      1. wagsmax

        Thanks Steve… just fmi, where did Sencha announce this?… I will have to keep my eyes open on that web site for sure.

  4. konstantin

    I have a question about this fix… i made the change, refreshed my browser and noticed no change. is there something i have to do specifically. can i just say this .scss file and everything is ok? not working for me.

    Reply
    1. sdrucker Post author

      More specifically, you’d need to go to the folder containing your application’s .scss files (typically resources/sass) and type “compass watch .” to rebuild the css file to include the patched style properties.

      Reply
      1. Murray Hopkins

        If you get a meesage saying “Could not find compass” it means that compass is not installed when CMD was. At your command prompt type:

        gem install compass

        It took my machine about 30 secs before anything happenned then it started the install. When it is complete you can do the

        compass watch

        to recompile the sccs file as detailed above.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s