Explorar o código

Add padding to select2 container displayed above

Added padding to ".select2-search" container instead of margin for ".select2-search input". This fixes bug of "#select2" movement when resizing page.

Steps to reproduce the bug:
- open select2 so it appears above the input
- resize the window

Actual results:
- #select2-drop moves up by 4px

Expected results:
- #select2-drop stays in same place
Andrius Stonys %!s(int64=10) %!d(string=hai) anos
pai
achega
a35188cb00
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      select2.css

+ 2 - 2
select2.css

@@ -273,8 +273,8 @@ html[dir="rtl"] .select2-search input {
     background: url('select2.png') no-repeat -37px -22px, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0;
 }
 
-.select2-drop.select2-drop-above .select2-search input {
-    margin-top: 4px;
+.select2-drop.select2-drop-above .select2-search {
+    padding-top: 4px;
 }
 
 .select2-search input.select2-active {