dantheman
12 Feb 2010, 8:27 AM
Ext version tested:
Ext 3.1.1
Adapter used:
ext
css used:
only default ext-all.css
Browser versions tested against:
Doesn't Work:
FF 3.6 (firebug 1.5.0 installed)
Works:
Safari 4.0.4
Chrome beta (5.0.307.7)
IE7 (WINE-bottler package on Mac)
Operating System:
Mac Leopard 10.5.8
Description:
I wish to handle the contextmenu event, and prevent the browser from showing its context menu. My handler works, but the browser still shows its menu.
Test Case:
<html><head>
<link rel="stylesheet" href="/ext-3.1.1/resources/css/ext-all.css" />
<script src="/ext-3.1.1/adapter/ext/ext-base.js"></script>
<script src="/ext-3.1.1/ext-all-debug.js"></script>
<script>
Ext.onReady(function(){
Ext.BLANK_IMAGE_URL = '/ext-3.1.1/resources/images/default/s.gif';
Ext.QuickTips.init();
var tree = new Ext.tree.TreePanel({
renderTo: 'tree-panel',
root: new Ext.tree.TreeNode({
id: 'tree-root',
expanded: true,
text: 'da root'
}),
listeners: {
// this was a suggestion in the Help forum discussion (see link below)
render: function() {
Ext.getBody().on("contextmenu", Ext.emptyFn, null, {stopEvent: true});
},
contextmenu: function(node, e) {
e.stopEvent(); // also tried e.preventDefault() to no avail
alert("node: "+node.text);
}
}
});
tree.getRootNode().appendChild([{
id: 'child-one',
text: 'First Child'
},{
id: 'child-two',
text: 'Second Child'
},{
id: 'child-three',
text: 'Third Child'
}]);
});
</script>
</head><body><div id="tree-panel"></div></body></html>
See this URL : from the Help forum: https://www.extjs.com/forum/showthread.php?t=91676
Steps to reproduce the problem:
Right-click on a tree node. Alert will tell you the node's text, and FF will show its context menu
The result that was expected:
FF would NOT show its context menu
The result that occurs instead:
FF does show its context menu
Screenshot or Video:
NONE
Debugging already done:
NONE
Possible fix:
??
Ext 3.1.1
Adapter used:
ext
css used:
only default ext-all.css
Browser versions tested against:
Doesn't Work:
FF 3.6 (firebug 1.5.0 installed)
Works:
Safari 4.0.4
Chrome beta (5.0.307.7)
IE7 (WINE-bottler package on Mac)
Operating System:
Mac Leopard 10.5.8
Description:
I wish to handle the contextmenu event, and prevent the browser from showing its context menu. My handler works, but the browser still shows its menu.
Test Case:
<html><head>
<link rel="stylesheet" href="/ext-3.1.1/resources/css/ext-all.css" />
<script src="/ext-3.1.1/adapter/ext/ext-base.js"></script>
<script src="/ext-3.1.1/ext-all-debug.js"></script>
<script>
Ext.onReady(function(){
Ext.BLANK_IMAGE_URL = '/ext-3.1.1/resources/images/default/s.gif';
Ext.QuickTips.init();
var tree = new Ext.tree.TreePanel({
renderTo: 'tree-panel',
root: new Ext.tree.TreeNode({
id: 'tree-root',
expanded: true,
text: 'da root'
}),
listeners: {
// this was a suggestion in the Help forum discussion (see link below)
render: function() {
Ext.getBody().on("contextmenu", Ext.emptyFn, null, {stopEvent: true});
},
contextmenu: function(node, e) {
e.stopEvent(); // also tried e.preventDefault() to no avail
alert("node: "+node.text);
}
}
});
tree.getRootNode().appendChild([{
id: 'child-one',
text: 'First Child'
},{
id: 'child-two',
text: 'Second Child'
},{
id: 'child-three',
text: 'Third Child'
}]);
});
</script>
</head><body><div id="tree-panel"></div></body></html>
See this URL : from the Help forum: https://www.extjs.com/forum/showthread.php?t=91676
Steps to reproduce the problem:
Right-click on a tree node. Alert will tell you the node's text, and FF will show its context menu
The result that was expected:
FF would NOT show its context menu
The result that occurs instead:
FF does show its context menu
Screenshot or Video:
NONE
Debugging already done:
NONE
Possible fix:
??