Results 1 to 3 of 3

Thread: Tree panel hanging on right click event.

  1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    55
    Answers
    2

    Default Tree panel hanging on right click event.

    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

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,409
    Answers
    716

    Default

    A small test case would be helpful so we can see what you are doing.

    Code:
    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;
                        }
                    }
                }            
            });
        }
    });

  3. #3
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,409
    Answers
    716

    Default

    You can post the code in our fiddle and make the needed changes:
    https://fiddle.sencha.com/#home

Posting Permissions

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