Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,506
    Vote Rating
    54
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default [FIXED] [3.0.0] TreeNodeUI dblclick event not cancelable

    [FIXED] [3.0.0] TreeNodeUI dblclick event not cancelable


    The code is

    Code:
        onDblClick : function(e){
            e.preventDefault();
            if(this.disabled){
                return;
            }
            if(this.checkbox){
                this.toggleCheck();
            }
            if(!this.animating && this.node.isExpandable()){
                this.node.toggle();
            }
            this.fireEvent("dblclick", this.node, e);
        },
    People should be able to listen for the dblclick event, and react to it but disable the TreeNode's default action, so I think it should be

    Code:
        onDblClick : function(e){
            e.preventDefault();
            if(this.disabled){
                return;
            }
            if (this.fireEvent("dblclick", this.node, e) !== false) {
                if(this.checkbox){
                    this.toggleCheck();
                }
                if(!this.animating && this.node.isExpandable()){
                    this.node.toggle();
                }
            }
        },

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,942
    Vote Rating
    636
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Fixed in SVN, though not quite how you've specified it.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,506
    Vote Rating
    54
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Yes, I did actually consider the idea of the beforexxxxx event. I know that YUI3's new event structure wraps all events.

    I see a new addition in TreeNode, but the event name is wrong. It won't actually cause a bug, but best avoid confusion.

    Code:
            * @event befordbleclick
            * Fires before double click processing. Return false to cancel the default action.
            * @param {Node} this This node
            * @param {Ext.EventObject} e The event object
            */
            "beforeclick", <-- should be "beforedblclick"

Thread Participants: 1