From 3ef524d806caf990d6c7c3f64020af53545e849a Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Mon, 22 Aug 2011 08:57:03 -0400
Subject: [PATCH] - Prevent from form submit with Enter key in file input fields in Internet Explorer

---
 program/js/app.js |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/program/js/app.js b/program/js/app.js
index 808adc5..bbb14e7 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -402,6 +402,10 @@
         break;
       }
 
+    // prevent from form submit with Enter key in file input fields
+    if (bw.ie)
+      $('input[type=file]').keydown(function(e) { if (e.keyCode == '13') e.preventDefault(); });
+
     // flag object as complete
     this.loaded = true;
 

--
Gitblit v1.9.1