Ext.window.MessageBox draggable false, error calling hide method

After creating an instance of MessageBox like this

var msgBox = Ext.create('Ext.window.MessageBox',{draggable: false});

-actually draggable false was set through an override to Ext.window.Window, I'm putting it like this to make it easier to reproduce.

- also I do prefer the singleton syntax but there are already a ton of instances created like this in the code I'm working on.

msgBox.alert("I am a bug, try to close me to reproduce");

Trying to close this MessabeBox calls the hide method:

hide: function() { var me = this; me.dd.endDrag(); me.progressBar.reset(); me.removeCls(me.cfg.cls); me.callParent(arguments); },

which throws the following error:

Cannot read property 'endDrag' of undefined

Am I missing something or this is a bug?


<strong>I'm using ExtJs 4.1.1 (but also happens in Extjs 4.2.1 (fixed on 4.2.2))</strong>

Any ideas or comments ?


To avoid this error I'm overriding hide method on MessageBox class:

Ext.define('Ext.window.MessageBox', { override: 'Ext.window.MessageBox', hide : function () { /** * this is the default implementation of hide in minus MessageBox the commented line * */ var me = this; //me.dd.endDrag(); me.progressBar.reset(); me.removeCls(me.cfg.cls); /** * this is the implementation of hide in Ext.Component * avoided callParent() because that would have called the overridden hide method */ me.showOnParentShow = false; if (!(me.rendered && !me.isVisible()) && me.fireEvent('beforehide', me) !== false) { me.hidden = true; if (me.rendered) { me.onHide.apply(me, arguments); } } return me; } });

<strong>Update, this was the original override</strong>

Ext.window.Window.override({ initComponent: function () { this.draggable = false; this.resizable = false; this.callParent(); } });

I'm open to suggestions to avoid this override. Thanks.


  • iPhone - UIWebView multiple locks
  • How to get to older Xcode beta version?
  • Safari PHP form submission -file upload hangs
  • Programmatically access files in Document set in sharepoint using Javascript
  • didUpdatePushCredentials not get called
  • Defined variables not working in javascript files when I use getScript
  • Suppressing passwd when calling sqlplus from shell script
  • how does System.Web.HttpRequest::PathInfo work?
  • Execute scripts AJAX returns
  • Not able to aggregate on nested fields in elasticsearch
  • Tamper-proof configuration files in .NET?
  • How to use JavaScript to determine whether a file exists in a directory?
  • JQuery Internet Explorer and ajaxstop
  • Functions in global context
  • Android full screen on only one activity?
  • Unity3D & Android: Difference between “UnityMain” and “main” threads?
  • FileReader+canvas image loading problem
  • Optimizing database types to compact database (SQLite)
  • RectangularRangeIndicator format like triangular using dojo
  • TFS: Get latest causes slow project reloading
  • Incrementing object id automatically JS constructor (static method and variable)
  • Does CUDA 5 support STL or THRUST inside the device code?
  • Running a C# exe file
  • Trying to switch camera back to front but getting exception
  • Compare two NSDates in iPhone
  • Matrix multiplication with MKL
  • PHP: When would you need the self:: keyword?
  • Acquiring multiple attributes from .xml file in c#
  • Free memory of cv::Mat loaded using FileStorage API
  • Hits per day in Google Big Query
  • Angular 2 constructor injection vs direct access
  • How to CLICK on IE download dialog box i.e.(Open, Save, Save As…)
  • File not found error Google Drive API
  • How to get Windows thread pool to call class member function?
  • How can I remove ASP.NET Designer.cs files?
  • unknown Exception android
  • Programmatically clearing map cache
  • Reading document lines to the user (python)
  • Converting MP3 duration time
  • java string with new operator and a literal