View Full Version : Portlet is dragged when clicked on body. Need to disable it.

30 May 2013, 2:50 PM
Hello guys,

I followed the Portlet demo for extjs 4.0.7..

My portlets are dragged and I can drop them in any columns. But they can be dragged even when I click on the portlet's body.

Is there some configuration where I can disable the body drag? and just set it to the header drag?

Currently I can drag using both, header and body(which was the default behavior) ever since I've configured it for my app.

UPDATE : When I have my mouse button clicked on the body, I see a new 'div' being created with a class 'x-panel-dd-spacer'.... Now is this a proxy or something that is being created here? How am I supposed to restrict the creation of this new div?

Any help would be appreciated.

31 May 2013, 9:09 AM
Sorry for bumping this topic.. Any help on this guys?

31 May 2013, 9:22 AM
Take a look a the docs for Ext.panel.Panel's draggable (http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.panel.Panel-cfg-draggable) config.

31 May 2013, 9:30 AM
Hi Friend,

Thank for pointing out the docs..

In my case, all I see is a div created with the id I specify, so can I tweak the code from docs

draggable: { delegate: 'h1' }
to something like this ?

draggable: { delegate: 'div id="myId"' }
Or will I explicitly have to create a h1 or some other tag to have it do that?
I also saw the code in ext-all-debug : Ext.define('Ext.dd.StatusProxy', { : But this is triggered when I click on the body :( Not sure why :| Maybe I need an upgrade from 4.0.7 to 4.2 or something.