Ver código fonte

dont bubble up ESC keypress. fixes #118

Igor Vaynberg 13 anos atrás
pai
commit
800b7bbb3f
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      select2.js

+ 2 - 2
select2.js

@@ -1006,7 +1006,7 @@
                     return;
                     return;
                 case KEY.ESC:
                 case KEY.ESC:
                     this.cancel(e);
                     this.cancel(e);
-                    e.preventDefault();
+                    killEvent(e);
                     return;
                     return;
                 }
                 }
             }));
             }));
@@ -1276,7 +1276,7 @@
                         return;
                         return;
                     case KEY.ESC:
                     case KEY.ESC:
                         this.cancel(e);
                         this.cancel(e);
-                        e.preventDefault();
+                        killEvent(e);
                         return;
                         return;
                     }
                     }
                 }
                 }