Results 1 to 5 of 5

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

  1. #1
    Ext JS Premium Member
    Join Date
    May 2008
    Posts
    23
    Vote Rating
    0
      0  

    Default [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
    18,608
    Vote Rating
    874
      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
    Twitter - @evantrimboli

  3. #3
    Ext JS Premium Member
    Join Date
    May 2008
    Posts
    23
    Vote Rating
    0
      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
    18,608
    Vote Rating
    874
      0  

    Default

    Right, I get you, fixed in SVN.
    Evan Trimboli
    Twitter - @evantrimboli

  5. #5
    Ext JS Premium Member
    Join Date
    May 2008
    Posts
    23
    Vote Rating
    0
      0  

    Default

    Excellent, thank you.

Posting Permissions

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