소스 검색

Merge pull request #2238 from mkurz/focus-fix

Prevent the cursor from setting it to initial position in IE
Kevin Brown 11 년 전
부모
커밋
0d06066331
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      select2.js

+ 3 - 0
select2.js

@@ -1221,6 +1221,9 @@ the specific language governing permissions and limitations under the Apache Lic
                 dropWidth = $dropdown.outerWidth(false);
                 enoughRoomOnRight = dropLeft + dropWidth <= viewPortRight;
                 $dropdown.show();
+
+                // fix so the cursor does not move to the left within the search-textbox in IE
+                this.focusSearch();
             }
 
             if (this.opts.dropdownAutoWidth) {