소스 검색

fix #1425 ctrl+enter should not open

Igor Vaynberg 12 년 전
부모
커밋
3ab1aafae5
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      select2.js

+ 3 - 0
select2.js

@@ -1909,6 +1909,9 @@ the specific language governing permissions and limitations under the Apache Lic
 
                 if (e.which == KEY.DOWN || e.which == KEY.UP
                     || (e.which == KEY.ENTER && this.opts.openOnEnter)) {
+
+                    if (e.altKey || e.ctrlKey || e.shiftKey || e.metaKey) return;
+                    
                     this.open();
                     killEvent(e);
                     return;