﻿<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://developers.de/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"><channel><title>Developer docs by Indraneel Pole : Sencha Touch</title><link />http://developers.de/blogs/indraneel/archive/tags/Sencha+Touch/default.aspx<description>Tags: Sencha Touch</description><dc:language>en</dc:language><generator>CommunityServer 2008 SP1 (Build: 30619.63)</generator><item><title>Guide to create orientation awareness in Sencha Touch Apache Cordova App – Part 1</title><link />http://developers.de/blogs/indraneel/archive/2016/08/18/guide-to-create-orientation-awareness-in-sencha-touch-apache-cordova-app-part-1.aspx<pubdate>Thu, 18 Aug 2016 12:47:04 GMT</pubdate><guid ispermalink="false">7e491611-45ad-4dae-a68f-c4cb64439510:1796646</guid><dc:creator>Indraneel Pole</dc:creator><slash:comments>0</slash:comments><wfw:commentrss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://developers.de/blogs/indraneel/rsscomments.aspx?PostID=1796646</wfw:commentrss><comments>http://developers.de/blogs/indraneel/archive/2016/08/18/guide-to-create-orientation-awareness-in-sencha-touch-apache-cordova-app-part-1.aspx#comments</comments><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I have been writing about Sencha Touch and Cordova for sometime now. In a sense it is documentation of my learning of these two platforms in last couple of months which might help somebody out there, who is struggling with the same issues that I once had. I have never used Sencha Architect for my development environment. I am using Visual Studio as Text Editor as well as Packager for Cordova Applications with TACO extension.&lt;/p&gt;  &lt;p&gt;In my path of mastering Cordova and Sencha Touch, I have stumbled upon building orientation aware applications using these frameworks, and this is the part 1 of multi-part tutorial about how to create orientation aware cross platform application using these two frameworks.&lt;/p&gt;  &lt;p&gt;For any orientation aware application there are two things that the developer should take care of - &lt;/p&gt;  &lt;p&gt;1. Device orientation at the start of the application.&lt;/p&gt;  &lt;p&gt;2. Orientation change events&lt;/p&gt;  &lt;p&gt;But first we need to look into the application architecture to decide how to incorporate orientation change in the application. As you know Sencha Touch framework works on MVC architecture with a slight twist of Stores and Profiles. If you are interested in Sencha Touch architecture and how profiles work in Sencha Touch, &lt;a href="http://www.c-sharpcorner.com/UploadFile/8ea0e0/how-to-use-profiles-in-mvc-of-sencha-sencha-touchapache-co/"&gt;this post&lt;/a&gt; might be useful for you. Right now our focus is not on Models, Controllers, and Stores but purely on Views of the application as the orientation will only affect the views of the application. In the context of Sencha Touch, profiles also play a crucial role while designing orientation awareness. A lot of times, your views are different for different profiles of the application. For the simplicity of tutorial, I am going to take 2 profiles - one tablet, and one phone, and build orientation awareness for both of them.&lt;/p&gt;  &lt;p&gt;Here are the steps that we are going to follow while building orientation aware application -&lt;/p&gt;  &lt;p&gt;1. Create a sample application with two profiles – Tablet and Mobile&lt;/p&gt;  &lt;p&gt;2. Install Orientation Plugin from Cordova plugin manager.&lt;/p&gt;  &lt;p&gt;3. Create views and controller&lt;/p&gt;  &lt;p&gt;4. Add views to viewport based on the orientation of the device at the start of the application&lt;/p&gt;  &lt;p&gt;5. Handle the orientation change event&lt;/p&gt;  &lt;p&gt;6. Take care of stylesheets.&lt;/p&gt;  &lt;p&gt;To start with I have created a sample Cordova application in Visual Studio 2015 named OrientationTutorial. I have added Sencha-Touch-Debug.js and Sencha-Touch.css files to my application’s root folder and loaded them in index.html. Pretty normal stuff, isn’t it? The tricky part is, unlike Sencha Architect Visual Studio doesn’t have desired visual builder for sencha touch that can let you build your views, controllers, models, stores, and profiles in different folders and build a nice app.js for you in the end. So we have to do it ourselves. &lt;/p&gt;  &lt;p&gt;In app.js, I create the application, while in view, profile, and controller folders, I create respective views, profile, and controllers. I load all the files in index.html body, and pray to God that everything works fine. (Kidding, when Sencha Touch breaks, even God cannot fix it). The solution explorer looks something like this - &lt;/p&gt;  &lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/indraneel/Screenshot_2D00_312_5F00_7281BFF0.png"&gt;&lt;img title="Screenshot (312)" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto;display:block;padding-right:0px;border-top-width:0px;margin-right:auto;" border="0" alt="Screenshot (312)" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/indraneel/Screenshot_2D00_312_5F00_thumb_5F00_194FD631.png" width="241" height="366" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Main view is basically just the toolbar on the top of the application. Home view has some example buttons which do nothing basically. (At least for now). So here is how we are going to do it. We create main view, which is a container with a toolbar on the top, and stick it to the application forever. Then based on the orientation of the application we change add the appropriate home view to the application.&lt;/p&gt;  &lt;p&gt;Go to config.xml, open plugin tab and add orientation plugin to your application. It should look something like this - &lt;/p&gt;  &lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/indraneel/Screenshot_2D00_313_5F00_324BA676.png"&gt;&lt;img title="Screenshot (313)" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto;display:block;padding-right:0px;border-top-width:0px;margin-right:auto;" border="0" alt="Screenshot (313)" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/indraneel/Screenshot_2D00_313_5F00_thumb_5F00_401DEC71.png" width="435" height="196" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I have created the main view at the launch of the respective profile. That means the Main view is add when the phone/tablet profile is launched.&lt;/p&gt;  &lt;p&gt;All the default views such as homePhone and homeTablet are by default landscape views. We will create portrait view differently. For that, add the folder to the view folder called ‘portrait’. Inside this, create homePortrait view.&lt;/p&gt;  &lt;p&gt;Now, some important things. In our design architecture, we are going to create views based on their alias’. Sencha Touch creates alias’ based on xtypes in the background. Which means we cannot use same xtype for views which are essentially same but are designed differently for different profiles and orientation. For example, the home view has 5 buttons, which all work the same. But based on whether the view is rendered on tablet or phone and whether the orientation is portrait or landscape, the position of these buttons change. So for these different rendering we have different views. But we might need same xtype in the controller for these views, to tie these to some model or load data from store. To overcome this problem, we use two approaches. We tie different profile views to same widget by inserting profile name between them explicitly at the initialization of the profile. This way the views can share same xtype but are rendered based on their profile names. This works for profiles because on one device only one profile is activated. The code looks something like this - &lt;/p&gt;  &lt;pre&gt;Ext.ClassManager.setAlias(&amp;#39;OrientationTutorialApp.view.tablet.Home&amp;#39;, &amp;#39;widget.homeView&amp;#39;);
&lt;/pre&gt;

&lt;p&gt;However, what about orientation? Orientation can change multiple times while using the application. And so we cannot even explicitly tie the orientation view to the alias. To fix this, we simply create the view by adding widget.portrait.* to the item id of the view whenever the portrait view is to be created, and for landscape view we just use normal alias. Also, inside controller we avoid using alias in configuration refs. That is because when you use alias in config refs and you have to use the views inside controllers, you have to invoke them twice with two different alias. This increases duplicate code. Instead one can either use IDs or Ref. IDs are advised against by Sencha Developer Team and rightfully so. IDs add a lot of confusion as well as if you don’t destroy the views with same ids, you are in a deep trouble with multiple hours of debugging one line of code. Ref however, in my opinion is the best approach to tackle this issue. The configuration inside controller should look something similar to - &lt;/p&gt;

&lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/indraneel/Screenshot_2D00_336_5F00_33ADC672.png"&gt;&lt;img title="Screenshot (336)" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto;border-left:0px;display:block;padding-right:0px;margin-right:auto;" border="0" alt="Screenshot (336)" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/indraneel/Screenshot_2D00_336_5F00_thumb_5F00_41800C6D.png" width="419" height="160" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Notice the refs in the Config.&lt;/p&gt;

&lt;p&gt;And here is how the landscape view of the home looks - &lt;/p&gt;

&lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/indraneel/Screenshot_2D00_332_5F00_72158CFB.png"&gt;&lt;img title="Screenshot (332)" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto;display:block;padding-right:0px;border-top-width:0px;margin-right:auto;" border="0" alt="Screenshot (332)" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/indraneel/Screenshot_2D00_332_5F00_thumb_5F00_66EC02B1.png" width="405" height="225" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have created five sample buttons and arranged them in a bit vbox container and then smaller hbox containers. The arrangement has been handled in the sencha view while positioning and sizes are configured in css.&lt;/p&gt;

&lt;p&gt;When the application is launched, the showTab function is launched with the id of homeView. showTab function checks the current orientation of device, and accordingly adds prefix to id in order to create correct widget with alias. The code snippet is as following - &lt;/p&gt;

&lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/indraneel/Screenshot_2D00_337_5F00_36568223.png"&gt;&lt;img title="Screenshot (337)" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto;border-left:0px;display:block;padding-right:0px;margin-right:auto;" border="0" alt="Screenshot (337)" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/indraneel/Screenshot_2D00_337_5F00_thumb_5F00_3A60CFF5.png" width="389" height="243" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now without creating portrait view of home, if we just apply orientation change event, this happens - &lt;/p&gt;

&lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/indraneel/Screenshot_2D00_334_5F00_18E3A33C.png"&gt;&lt;img title="Screenshot (334)" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto;border-left:0px;display:block;padding-right:0px;margin-right:auto;" border="0" alt="Screenshot (334)" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/indraneel/Screenshot_2D00_334_5F00_thumb_5F00_5FCCC639.png" width="202" height="334" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see, the view is totally distorted, buttons cannot be seen, and Title bar cannot hold complete text. Some of this can be handled by CSS (Which I will cover in the next part of this tutorial), However, in order to give seamless experience to the end user, one needs to design a different view altogether. &lt;/p&gt;

&lt;p&gt;So I created a portrait version of the home view. Notice that it has same id and same ref but NOT same xtype. This is very important. You cannot have two views with same xtype. It creates hell of a confusion inside framework, and more often than not, framework gives you wrong view for wrong orientation.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/indraneel/Screenshot_2D00_339_5F00_2F3745AB.png"&gt;&lt;img title="Screenshot (339)" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto;border-left:0px;display:block;padding-right:0px;margin-right:auto;" border="0" alt="Screenshot (339)" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/indraneel/Screenshot_2D00_339_5F00_thumb_5F00_0F1C38EE.png" width="449" height="275" /&gt;&lt;/a&gt;&amp;#160; &lt;/p&gt;

&lt;p&gt;The view looks like this - &lt;/p&gt;

&lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/indraneel/Screenshot_2D00_335_5F00_54A33BEF.png"&gt;&lt;img title="Screenshot (335)" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto;border-left:0px;display:block;padding-right:0px;margin-right:auto;" border="0" alt="Screenshot (335)" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/indraneel/Screenshot_2D00_335_5F00_thumb_5F00_1B8C5EED.png" width="233" height="402" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see the view is still not perfect. Background is not exactly in the center, nor is it visible, as well as buttons need better alignment and title bar can do with smaller font to accommodate complete text. However, we will take care of that with CSS.&lt;/p&gt;

&lt;p&gt;Now the only thing that remains is handling the orientation change event. For that, we add &lt;em&gt;orientationchange&lt;/em&gt; event to viewport, and handle it in onOrientationChange function. Well, there is actually nothing much to handle, just get the active items id which in this case is homeView. destroy the landscape component, and add the portrait with the help of showTab function which I have already described above.&lt;/p&gt;

&lt;p&gt;In Main controller, I added control to viewport inside config, and the function onOrientationChange is created in Main controller as given below -&lt;/p&gt;

&lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/indraneel/Screenshot_2D00_339_5F00_56055BEB.png"&gt;&lt;img title="Screenshot (339)" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto;border-left:0px;display:block;padding-right:0px;margin-right:auto;" border="0" alt="Screenshot (339)" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/indraneel/Screenshot_2D00_339_5F00_thumb_5F00_7CD3722B.png" width="474" height="167" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That’s all. The basic orientation awareness is implemented. In the next part, I would talk about creating different classes for different orientation, and handling multiple views.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://developers.de/aggbug.aspx?PostID=1796646" width="1" height="1"&gt;</description><category domain="http://developers.de/blogs/indraneel/archive/tags/JavaScript/default.aspx">JavaScript</category><category domain="http://developers.de/blogs/indraneel/archive/tags/Cross+platform+development/default.aspx">Cross platform development</category><category domain="http://developers.de/blogs/indraneel/archive/tags/ExtJS/default.aspx">ExtJS</category><category domain="http://developers.de/blogs/indraneel/archive/tags/Sencha+Touch/default.aspx">Sencha Touch</category><category domain="http://developers.de/blogs/indraneel/archive/tags/ApacheCordova/default.aspx">ApacheCordova</category><category domain="http://developers.de/blogs/indraneel/archive/tags/Android/default.aspx">Android</category></item><item><title>Profile views in Sencha Touch Ext JS are not selected in right way</title><link />http://developers.de/blogs/indraneel/archive/2015/11/11/profile-views-in-sencha-touch-ext-js-are-not-selected-in-right-way.aspx<pubdate>Wed, 11 Nov 2015 17:24:30 GMT</pubdate><guid ispermalink="false">7e491611-45ad-4dae-a68f-c4cb64439510:1609428</guid><dc:creator>Indraneel Pole</dc:creator><slash:comments>0</slash:comments><wfw:commentrss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://developers.de/blogs/indraneel/rsscomments.aspx?PostID=1609428</wfw:commentrss><comments>http://developers.de/blogs/indraneel/archive/2015/11/11/profile-views-in-sencha-touch-ext-js-are-not-selected-in-right-way.aspx#comments</comments><description>&lt;p&gt;Last week, I added profiles in my existing MVC Sencha Touch app, which was designed only for tablet view. To make it mobile friendly, I used Sencha&amp;#39;s awesome profiles. So what I did was, I replicated all views in tablet and phone profiles, which means basically I created new views, e.g. MyApp.view.profileName.xyz for all the views, where profileName was either tablet or phone, and xyz was replaced by view name. These views are extended from MyApp.view.xyz. I followed &lt;a href="http://docs.sencha.com/touch/2.3.1/#!/guide/profiles"&gt;Sencha Touch&amp;#39;s guidelines&lt;/a&gt; to use Profiles while doing so, and thus I was quite confident that this would work great. However, the app always used only phone view regardless of which device I use. If I commented out the phone profile, it used by default the tablet view for all devices. And so even after using Profile functionality, it was only using single kind of view for all devices in my app. After some Googling, I found out the solution.&lt;/p&gt;  &lt;p&gt;Solution: In the profiles I was using xtype in the base class and if I don&amp;#39;t use the same xtype in profile view classes, only the base view is rendered which is basically nothing but a blank white screen. Why? Because I am not adding the views to viewport inside profile launch application (Don&amp;#39;t ask why, that&amp;#39;s how the app is developed since the start for various reasons.) instead I use Ext.widget to create the view and add it to Viewport inside Main controller launch function. And there I get the views by xtype.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/indraneel/image_5F00_4FCE2808.png"&gt;&lt;img title="image" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/indraneel/image_5F00_thumb_5F00_769C3E48.png" width="681" height="196" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;To fix this, I had to use alias instead of xtype. I used the alias for the base view class. The code looked something like this.   &lt;br /&gt;Now in the launch function of your each profile, all you have to do is, set this alias to the views of corresponding profile. The code for this looks like this.    &lt;br /&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/indraneel/image_5F00_6B72B3FE.png"&gt;&lt;img title="image" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/indraneel/image_5F00_thumb_5F00_325BD6FC.png" width="687" height="300" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;this widget.main is then used with widget.create(widget.main), to create the main view. When you use phone for example, only the phone profile is activated and the alias is set only for the phone profile instead of both. And this solves the problem.&lt;/p&gt;  &lt;p&gt;I don&amp;#39;t know if anybody has also encountered this problem before, and why specifically I explicitly had to map the widget.main in profiles, but in case it happens in future with somebody, this post should be able to help them.    &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://developers.de/aggbug.aspx?PostID=1609428" width="1" height="1"&gt;</description><category domain="http://developers.de/blogs/indraneel/archive/tags/JavaScript/default.aspx">JavaScript</category><category domain="http://developers.de/blogs/indraneel/archive/tags/ExtJS/default.aspx">ExtJS</category><category domain="http://developers.de/blogs/indraneel/archive/tags/Sencha+Touch/default.aspx">Sencha Touch</category></item><item><title>Overlay mask is not destroyed after closing the Alert box in Sencha Touch</title><link />http://developers.de/blogs/indraneel/archive/2015/10/30/overlay-mask-is-not-destroyed-after-closing-the-alert-box-in-sencha-touch.aspx<pubdate>Fri, 30 Oct 2015 17:18:04 GMT</pubdate><guid ispermalink="false">7e491611-45ad-4dae-a68f-c4cb64439510:1591413</guid><dc:creator>Indraneel Pole</dc:creator><slash:comments>0</slash:comments><wfw:commentrss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://developers.de/blogs/indraneel/rsscomments.aspx?PostID=1591413</wfw:commentrss><comments>http://developers.de/blogs/indraneel/archive/2015/10/30/overlay-mask-is-not-destroyed-after-closing-the-alert-box-in-sencha-touch.aspx#comments</comments><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Working with Sencha Touch can be great and disastrous at the same time depending upon how you are using it. This week was disastrous for me for many reasons, but the major reason was what I described in the title of this article.&lt;/p&gt;  &lt;p&gt;So here is the background, I happen to handle an old code where old Sencha Touch library (2.2 if I am not wrong) is used in accordance with Cordova Tools to develop a mobile app. As if that was not enough, I ported this whole code in Visual Studio environment. &lt;/p&gt;  &lt;p&gt;Now, this all was working quite okay until I stumbled upon an alert box. Normally, as soon as the alert box is called, an overlay mask is set on the whole screen and then the alert box is shown. When you click on the Ok, the alert box is gone, and the overlay is removed. However, here came the problem. The alert box was gone of course but the overlay was not removed resulting in the locking of the screen, I couldn&amp;#39;t do anything until I refresh the page again which is usually not a easy thing in an app for a user.&lt;/p&gt;  &lt;p&gt;After hours of debugging and going through the same code again and again, I realized that this is the bug in the Sencha Touch library itself. This was confirmed by &lt;a href="https://www.sencha.com/forum/"&gt;Sencha Touch Forum&lt;/a&gt; This problem can also be seen on an &lt;a href="http://cdn.sencha.com/touch/sencha-touch-2.2.0/examples/kitchensink/index.html#demo/overlays"&gt;old example from Sencha&lt;/a&gt;. It has also been mentioned on the forum that this bug is fixed in the latest version of the library starting from 2.3.0-b3.     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;Well so the actual solution was to just replace the library in my project and hope for the best. However, that&amp;#39;s where the second headache started.   &lt;br /&gt;I don&amp;#39;t really know how and why but the guys who coded it originally created a huge ‘app.js’ file with all the libraries, views, controllers and everything inside it. So removing library option was no longer available, and that&amp;#39;s when I turned to a temporary fix.&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;This was happening in the alert box so I went to Ext.MessageBox. This is usually inside messagebox.js (According to forum) However for me it was inside app.js. It has showAnimation and hideAnimation, in which hideAnimation value is set to {type:&amp;#39;popOut&amp;#39;,duration: 250,easing: &amp;#39;ease-out&amp;#39;},    &lt;br /&gt;&lt;strong&gt;Remove this and set it to null.&lt;/strong&gt;    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;So instead of&lt;/p&gt;  &lt;p&gt;hideAnimation: {type:&amp;#39;popOut&amp;#39;,duration: 250,easing: &amp;#39;ease-out&amp;#39;},&lt;/p&gt;  &lt;p&gt;you should use &lt;/p&gt;  &lt;p&gt;hideAnimation: null,&lt;/p&gt;  &lt;p&gt;where &amp;#39;Ext.MessageBox&amp;#39; is defined.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Why:&lt;/strong&gt; Usually when the popOut animation is over, the view has display:none. However, in my case this was not none even after messageBox was disappeared. So clearly the hiding animation was not working properly in this case. I set it to none, i.e. completely removed the pop out animation from hiding part of the message box and voila. The problem is gone.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://developers.de/aggbug.aspx?PostID=1591413" width="1" height="1"&gt;</description><category domain="http://developers.de/blogs/indraneel/archive/tags/JavaScript/default.aspx">JavaScript</category><category domain="http://developers.de/blogs/indraneel/archive/tags/ExtJS/default.aspx">ExtJS</category><category domain="http://developers.de/blogs/indraneel/archive/tags/Sencha+Touch/default.aspx">Sencha Touch</category></item></channel></rss>