If I show an ExtJS context menu on ExtJS panel after text selection, it hides or deselects the text selection or window selection. How can I keep the selection when the context menu is shown?
listeners: {
afterrender: function(comp) {
comp.getEl().on('contextmenu', function(e,src) {
//stop default browser context menu appearing
e.stopEvent();
contextMenu = new Ext.menu.Menu({
items: [{
text: "Show On Map",
iconCls: 'map',
handler: function(a,b,c) {
alert(this.id);
}
}]
});
contextMenu.showAt([e.getPageX(),e.getPageY()]);
});
}
}