From 0501156694388b9983a369dc98d2d1dee4303baf Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Wed, 10 Jul 2013 17:50:41 +0200 Subject: [PATCH] Fixes drop down menu position after window resize Fixes #1403 --- wcfsetup/install/files/js/WCF.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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(); -- 2.20.1