Bladeren bron

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

This reverts commit 6eb74930d58f7265839ecf256eedc72ef29d068b.
Igor Vaynberg 11 jaren geleden
bovenliggende
commit
ca7550bf4d
1 gewijzigde bestanden met toevoegingen van 2 en 8 verwijderingen
  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: