Fixed dropdown visibility and alignment
authorAlexander Ebert <ebert@woltlab.com>
Thu, 30 May 2013 18:31:08 +0000 (20:31 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 30 May 2013 18:31:08 +0000 (20:31 +0200)
wcfsetup/install/files/js/WCF.js

index 9809f956f2a9a036c440bea012dd4c099073187e..4ae33d8159e29cdf816fcc9141d1d2dc9cf95daf 100755 (executable)
@@ -944,7 +944,7 @@ WCF.Dropdown = {
                        else {
                                dropdownMenu.addClass('dropdownArrowRight');
                                
-                               $right = $dropdownOffsets.left + $dropdownDimensions.width + 'px';
+                               $right = ($windowWidth - ($dropdownOffsets.left + $dropdownDimensions.width)) + 'px';
                        }
                        
                        dropdownMenu.css({
@@ -5439,6 +5439,10 @@ WCF.Search.Base = Class.extend({
                
                WCF.CloseOverlayHandler.addCallback('WCF.Search.Base', $.proxy(function() { this._clearList(); }, this));
                
+               if (!this._list.is(':visible')) {
+                       WCF.Dropdown.toggleDropdown(this._searchInput.parents('.dropdown').wcfIdentify());
+               }
+               
                // pre-select first item
                this._itemIndex = -1;
                this._selectNextItem();