Hybrid View
-
1 Nov 2011 7:55 AM #1
App freezes when an incorrect query is passed to Ext.app.Controller.control()
App freezes when an incorrect query is passed to Ext.app.Controller.control()
Ext version:
4.0.7
Browsers:
Chrome, Chromium, FF
Description:
The complete page can freeze when an incorrect component query is passed to Ext.app.Controller.control()
Steps to recreate the problem:- Insert an incorrect component query into control()
- When continueing working in the application it can freeze at complete unrelated points in the code. (Most likely because another event occurs at that point)
The faulty query is either silently ignored or an warning/error is generated
Example:
Code:Ext.define('ecms.controller.Headers', { extend: 'Ext.app.Controller', init: function() { this.control({ 'headerform button[action=cancel]]': { //note the double "]" click: this.onCancelClick }, 'headerform button[action=cancel], headerform button[action=add]': { // an intinuative mistake seen before when the programmer is working with css as well click: this.onAnyClick } }); }, ... });
-
1 Nov 2011 8:05 AM #2
"Working" example: http://jsfiddle.net/WpD9C/13/
Click the expand/collapse +sign to freeze your tab. This is caused by the extra "]" in the component query in controller.control().
This fiddle is using 4.0.2a, but the result is the same.
Warning: this example will crash your browser (IE), or freeze your tab (real browsers
)
-
10 Nov 2011 9:18 AM #3
..bump..
To be honest I was hoping for an response from the dev's. Would they qualify this as a bug? And if not, should it be a feature request?
Personally I think this needs addressing
-
11 Nov 2011 7:26 AM #4
Thanks for the report.
Indeed, the query parser needs some 'hardening'.
If you stop execution of the jsFiddle sample (thx @danlib) with the Chrome debugger after trying to collapse the tree, you can see it's stuck trying to figure out what to do with the final ']'."be dom-ready..."
Doug Hendricks
Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.
Got Sencha licensing questions? Find out more here.
-
29 Jun 2012 3:11 AM #5
Thanx for the report! My browser froze and I didn't knew why. Then I read this and yes.. It was an incomplete CQ.
Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTJSIV-4455
in
4.1.


Reply With Quote

