Added some optimizations to balloon tooltips
authorMarcel Werk <burntime@woltlab.com>
Fri, 6 Jan 2012 13:53:27 +0000 (14:53 +0100)
committerMarcel Werk <burntime@woltlab.com>
Fri, 6 Jan 2012 13:53:27 +0000 (14:53 +0100)
wcfsetup/install/files/js/WCF.js

index 0138898cd2b91ff92f06a56576e82ddf74cf0812..bd73606858a22dc61ec50411dcdaebaeb50b9ca4 100644 (file)
@@ -2806,6 +2806,7 @@ WCF.Effect.BalloonTooltip.prototype = {
                                        $.proxy(this._mouseEnterHandler, this),
                                        $.proxy(this._mouseLeaveHandler, this)
                                );
+                               $element.click($.proxy(this._mouseLeaveHandler, this));
                        }
                }
        },
@@ -2824,6 +2825,12 @@ WCF.Effect.BalloonTooltip.prototype = {
                        $element.removeAttr('title');
                }
                
+               // reset tooltip position
+               this._tooltip.css({
+                       top: "0px",
+                       left: "0px"
+               });
+               
                // update text
                this._tooltip.children('span:eq(0)').text($element.data('tooltip'));