PDA

View Full Version : Tree panel hanging on right click event.



swiji2000
13 Feb 2014, 7:37 AM
Hi,

My tree panel is hanging if i click right button on mouse. I am not able to do any operation after that, like drag and drop anything. Tree panel is completely hanging.

Kindly help me to resolve this issue.

Thanks n Advance

scottmartin
13 Feb 2014, 9:01 AM
A small test case would be helpful so we can see what you are doing.



Ext.application({
name: 'Fiddle',

launch: function() {
var store = Ext.create('Ext.data.TreeStore', {
root: {
expanded: true,
children: [{
text: "detention",
leaf: true
}, {
text: "homework",
expanded: true,
children: [{
text: "book report",
leaf: true
}, {
text: "algebra",
leaf: true
}]
}, {
text: "buy lottery tickets",
leaf: true
}]
}
});

var menuContext = new Ext.menu.Menu({
items: [{
text: 'Do something'
}],
listeners: {
itemclick: function(item) {
// handle click
}
}
});

Ext.create('Ext.tree.Panel', {
title: 'Simple Tree',
width: 200,
height: 150,
store: store,
rootVisible: false,
renderTo: Ext.getBody(),

viewConfig: {
listeners: {
itemcontextmenu: function(view, rec, item, index, e) {
e.stopEvent();
menuContext.showAt(e.getXY());
return false;
}
}
}
});
}
});

scottmartin
13 Feb 2014, 9:04 AM
You can post the code in our fiddle and make the needed changes:
https://fiddle.sencha.com/#home