Browse Source

new test to prevent enter event

jose miguel 7 năm trước cách đây
mục cha
commit
394b7fe2b5
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      app/views/products/_form.html.erb

+ 1 - 1
app/views/products/_form.html.erb

@@ -317,7 +317,7 @@
 
 		$(document).on("keydown", function (e) {
 			if (window.location.pathname == "/products/new") {
-				if (e.which === 8 && !$(e.target).is("input, textarea")) {
+				if (e.which === 8) {
 					e.preventDefault();
 				}
 			}