Results 1 to 9 of 9

Thread: [CLOSED-563] contextmenu and e.stopEvent under FF 3.6 on Intel Mac

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1

    Default [CLOSED-563] contextmenu and e.stopEvent under FF 3.6 on Intel Mac

    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:

    Code:
    <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:
    • ??

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,247

    Default

    Can't confirm this using FF3.6 on Windows XP. Anyone else?
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  3. #3
    Sencha User mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236

    Default

    Can't reproduce it on an Intel Mac (OSX 10.6.2), running Fx3.6.

  4. #4

    Default Bug report Fail

    I had my wife check the test page (on a MBP) and it works properly!

    So I set about repeating my original debugging steps of disabling all my add-ons
    and plugins .. nothing worked.

    I finally poked around in her preferences, specifically the advanced menu for javascript (under Content).
    There is a checkbox item to allow scripts to Disable or replace context menus".

    As far as I recall, I've never even seen this menu, but my setting was not checked,
    and FF was apparently following this preference, by insisting on showing the context menu.

    I haven't adjusted my preferences in years.
    It never occurred to me that such a preference even existed.

    Please accept my sincere apologies for the wasted time.
    --dan

  5. #5
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661

    Default

    No problem, never know when someone else will have the same issue.

  6. #6

    Default

    Quote Originally Posted by Jamie Avins View Post
    No problem, never know when someone else will have the same issue.
    You're very gracious. Thanks.

  7. #7
    Sencha User mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236

    Default

    Quote Originally Posted by dantheman View Post
    I finally poked around in her preferences, specifically the advanced menu for javascript (under Content).
    There is a checkbox item to allow scripts to Disable or replace context menus".
    wow, thanks for the heads up on that!

    never knew that option existed too. guess it's yet one more thing to look out for in future.

  8. #8

    Default

    Quote Originally Posted by mystix View Post
    wow, thanks for the heads up on that!

    never knew that option existed too. guess it's yet one more thing to look out for in future.
    It was a real WTF moment for me ..

  9. #9
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364

    Default

    It seems that Fx 3.6, by default, must now have this enabled. I have a new MacBook Pro and Fx 3.6 is the only version of the browser installed and a fresh profile to boot and I had this problem.

    I knew it wasn't an Ext JS specific problem because I tested it on in 2.x, where I knew things were working. Ugh!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •