Browse Source

prevent select2 key events from bubbling to body

Nicolas Cannasse 6 years ago
parent
commit
414e785c2c
1 changed files with 5 additions and 0 deletions
  1. 5 0
      hide/comp/cdb/Cell.hx

+ 5 - 0
hide/comp/cdb/Cell.hx

@@ -337,6 +337,11 @@ class Cell extends Component {
 			(untyped s.select2)("val", currentValue == null ? "" : currentValue);
 			(untyped s.select2)("open");
 
+			var sel2 = s.data("select2");
+			sel2.$dropdown.find("input").on("keydown", function(e) {
+				e.stopPropagation();
+			});
+
 			s.change(function(e) {
 				var val = s.val();
 				if( val == "~" ) val = null;