Explorar o código

new test to prevent enter event

jose miguel %!s(int64=7) %!d(string=hai) anos
pai
achega
394b7fe2b5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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();
 				}
 			}