1. #1
    Ext JS Premium Member
    Join Date
    May 2008
    Posts
    23
    Vote Rating
    0
    sanderson is on a distinguished road

      0  

    Default [FIXED][2.2.1 build 3186] onDocMouseDown in ToolTip reversed logic

    [FIXED][2.2.1 build 3186] onDocMouseDown in ToolTip reversed logic


    I believe that this code is in ToolTip.js to allow tooltips to close if the user clicks elsewhere in the document while the tip is open and autoHide is off.
    Code:
        onDocMouseDown : function(e){
            if(this.autoHide !== false && !e.within(this.el.dom)){
                this.disable();
                this.enable.defer(100, this);
            }
        }

    However, for this to actually work, the line needs to be:
    Code:
    if(this.autoHide !== true && ...
    Without this change, the tip will not close if autohide is off, and if autohide is on the tip will close by itself regardless.

    Regards,
    -scott

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,046
    Vote Rating
    657
    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


    If we make that change, that means a tooltip with autoHide: false will get hidden when the user clicks the document. Or am I missing something?
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Ext JS Premium Member
    Join Date
    May 2008
    Posts
    23
    Vote Rating
    0
    sanderson is on a distinguished road

      0  

    Default


    Yes, exactly.

    Currently, if you don't have a close button and autoHide is false, there's no way to close the tooltip.

    Clicking on the document to close the tooltip only when autoHide is true makes no sense, because as soon as you mouse off the object with the tooltip, the tooltip will go away anyways.

  4. #4
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,046
    Vote Rating
    657
    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


    Right, I get you, fixed in SVN.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  5. #5
    Ext JS Premium Member
    Join Date
    May 2008
    Posts
    23
    Vote Rating
    0
    sanderson is on a distinguished road

      0  

    Default


    Excellent, thank you.

Thread Participants: 1