Fixed dropdown menu position for i18n textareas
authorAlexander Ebert <ebert@woltlab.com>
Mon, 27 May 2013 16:35:40 +0000 (18:35 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 27 May 2013 16:35:40 +0000 (18:35 +0200)
wcfsetup/install/files/js/WCF.js

index 9d59a9f36df46b51bc91dff9d4c5155f725be0ab..4a2a125e1eb05e6e50ac4a6545c2b0b35096fa2e 100755 (executable)
@@ -898,6 +898,13 @@ WCF.Dropdown = {
                var $menuDimensions = dropdownMenu.getDimensions('outer');
                var $windowWidth = $(window).width();
                
+               // check if button belongs to an i18n textarea
+               var $button = dropdown.find('.dropdownToggle');
+               if ($button.hasClass('dropdownCaptionTextarea')) {
+                       // use button dimensions instead
+                       $dropdownDimensions = $button.getDimensions('outer');
+               }
+               
                // validate if current alignment is still fine, prevents "jumping"
                var $align = null;
                switch (dropdownMenu.data('orientationX')) {