PDA

View Full Version : getDragData is not working in IE10 for panel. giving defaultView of undefined error



janardhan pasumarthi
31 Oct 2013, 9:28 AM
Hello All,

I've written custom getDragData method for my panel and given ddel properly.
code as follows:


getDragData: function(e) {


var sourceEl = e.getTarget('.my-panel-element-cls'), d;
if (sourceEl) {
d = sourceEl.cloneNode(true);
d.id = Ext.id();
return (this.dragData = {
sourceEl: sourceEl,
repairXY: Ext.fly(sourceEl).getXY(),
ddel: d,
myViewName: view
});
}
}


This code is working fine in chrome and all browsers except IE10. It is giving error in getStyle method of element, saying - unable to get property defaultView of undefined. In code,
style = dom.ownerDocument.defaultView.getComputedStyle(dom, null);

Not sure why that error is coming.

Can anybody please help to solve this.


Thanks,

janardhan.

janardhan pasumarthi
1 Nov 2013, 3:41 AM
Hello All,

If i remove draggable : false for my panel, then element is dragging properly as i've registered drag and drop zones for element. But, when i drop mouse somewhere on screem then it is going to repairXy method.

Please help me why this issue is coming and how to resolve it.


thanks

janardhan,

Gary Schlosberg
1 Nov 2013, 5:12 AM
In which version of ExtJS are you experiencing this error?

janardhan pasumarthi
1 Nov 2013, 5:34 AM
@Gary,

i'm using 4.2.1

Gary Schlosberg
1 Nov 2013, 3:57 PM
Can you post a runnable test case which exhibits the behavior? You can use our Fiddle (https://fiddle.sencha.com/#home) if you like.

janardhan pasumarthi
1 Nov 2013, 8:13 PM
@Gary,

Please find the sample code that i've written with simple panel having draggable property set to true.

https://fiddle.sencha.com/#fiddle/1b6