-
12 Apr 2010 8:47 AM #1
[OPEN-918] dblclick tool icon in window Panel expands
[OPEN-918] dblclick tool icon in window Panel expands
Ext version tested:
- Ext 3.2.0
Adapter used:- ext
css used:- only default ext-all.css
Browser versions tested against:- FF3
Description:- If you have a window and a tool that is not the min or max say [?] 'help' or something like that. If I click it two fast it treats it as a dbl click for what I assume is the title dblclick to expand the window fullscreen.
Test Case:
Setup a window with a custom tool say ">>" or "?" icons and do not put a handler then click it quickly and it should go fullscreen.Mike Giddens
=======================
Opportunity is missed by most people because it is dressed in overalls and looks like work - Thomas Edison
-
12 Apr 2010 10:03 AM #2Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,653
- Vote Rating
- 14
Could you post the code for the test case, I'm not quite following it.
-
13 Apr 2010 11:12 PM #3
Its the dblclick listener of the header element receiving the bubbled up dblclick event.
dblclick on the header maximizes.
Just paste this into Firebug's command line, and dblclick the print tool:
Code:new Ext.Window({ title: 'Foo', height: 100, width: 100, maximizable: true, tools: [{id:'print'}] }).show()Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
13 Apr 2010 11:16 PM #4
Fix:
Code:Ext.override(Ext.Window, { onRender : function(ct, position){ Ext.Window.superclass.onRender.call(this, ct, position); if(this.plain){ this.el.addClass('x-window-plain'); } // this element allows the Window to be focused for keyboard events this.focusEl = this.el.createChild({ tag: 'a', href:'#', cls:'x-dlg-focus', tabIndex:'-1', html: ' '}); this.focusEl.swallowEvent('click', true); this.proxy = this.el.createProxy('x-window-proxy'); this.proxy.enableDisplayMode('block'); if(this.modal){ this.mask = this.container.createChild({cls:'ext-el-mask'}, this.el.dom); this.mask.enableDisplayMode('block'); this.mask.hide(); this.mon(this.mask, 'click', this.focus, this); } if(this.maximizable){ this.mon(this.header, 'dblclick', this.toggleMaximize, this, {delegate: 'div.x-window-header'}); } } });Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
14 Apr 2010 12:26 AM #5
Actually, the above fix SHOULD work, but doesn't because of a bug in Element.findParent.
EventObject.getTarget, when passed a selector, uses Element.findParent.
When NOT passed a "depth" parameter, findParent assesses the "stopElement", and finds that it is the target element. Then the loop statement executes ZERO iterations:
Code:findParent : function(simpleSelector, maxDepth, returnEl){ var p = this.dom, b = document.body, depth = 0, stopEl; if(Ext.isGecko && Object.prototype.toString.call(p) == '[object XULElement]') { return null; } maxDepth = maxDepth || 50; if (isNaN(maxDepth)) { stopEl = Ext.getDom(maxDepth); // Shouldn't this be maxDepth.parentNode? maxDepth = Number.MAX_VALUE; } while(p && p.nodeType == 1 && depth < maxDepth && p != b && p != stopEl){ if(DQ.is(p, simpleSelector)){ return returnEl ? GET(p) : p; } depth++; p = p.parentNode; } return null; },Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
29 Apr 2010 7:21 AM #6
Bump! I think Animal has provided the needed information to make this an official bug.
Mike Giddens
=======================
Opportunity is missed by most people because it is dressed in overalls and looks like work - Thomas Edison
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote