소스 검색

Revert "Fixed Tab key not respecting opts.selectOnBlur" breaks tab key. fixes #1646.

This reverts commit 6eb74930d58f7265839ecf256eedc72ef29d068b.
Igor Vaynberg 11 년 전
부모
커밋
ca7550bf4d
1개의 변경된 파일2개의 추가작업 그리고 8개의 파일을 삭제
  1. 2 8
      select2.js

+ 2 - 8
select2.js

@@ -1927,10 +1927,7 @@ the specific language governing permissions and limitations under the Apache Lic
                         killEvent(e);
                         return;
                     case KEY.TAB:
-                        // if selectOnBlur == true, select the currently highlighted option
-                        if (this.opts.selectOnBlur) {
-                            this.selectHighlighted({noFocus: true});
-                        }
+                        this.selectHighlighted({noFocus: true});
                         return;
                     case KEY.ESC:
                         this.cancel(e);
@@ -2522,10 +2519,7 @@ the specific language governing permissions and limitations under the Apache Lic
                         killEvent(e);
                         return;
                     case KEY.TAB:
-                        // if selectOnBlur == true, select the currently highlighted option
-                        if (this.opts.selectOnBlur) {
-                            this.selectHighlighted({noFocus:true});
-                        }
+                        this.selectHighlighted({noFocus:true});
                         this.close();
                         return;
                     case KEY.ESC: