瀏覽代碼

new test to prevent enter event

jose miguel 7 年之前
父節點
當前提交
394b7fe2b5
共有 1 個文件被更改,包括 1 次插入1 次删除
  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();
 				}
 			}