From: Matthias Schmidt Date: Wed, 10 Jul 2013 15:50:41 +0000 (+0200) Subject: Fixes drop down menu position after window resize X-Git-Tag: 2.0.0_Beta_5~81^2~5 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0501156694388b9983a369dc98d2d1dee4303baf;p=GitHub%2FWoltLab%2FWCF.git Fixes drop down menu position after window resize Fixes #1403 --- diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index de6ff699aa..ae6f3c0ba8 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -715,6 +715,18 @@ WCF.Dropdown = { WCF.CloseOverlayHandler.addCallback('WCF.Dropdown', $.proxy(this._closeAll, this)); WCF.DOMNodeInsertedHandler.addCallback('WCF.Dropdown', $.proxy(this.init, this)); } + + $(window).resize($.proxy(this._resize, this)); + }, + + /** + * Handles resizing the window by making sure that the menu positions are + * recalculated. + */ + _resize: function() { + for (var $containerID in this._dropdowns) { + this._menus[$containerID].removeData('orientationX'); + } }, /** @@ -4697,7 +4709,7 @@ WCF.Effect.BalloonTooltip = Class.extend({ */ init: function() { if (jQuery.browser.mobile) return; - + if (!this._didInit) { // create empty div this._tooltip = $('
').appendTo($('body')).hide();