Author: kishore
Date: Tue Jan 16 12:22:23 2018
New Revision: 1821236

URL: http://svn.apache.org/viewvc?rev=1821236&view=rev
Log:
Fix for CONNECTORS-1485

Modified:
    manifoldcf/trunk/CHANGES.txt
    manifoldcf/trunk/framework/crawler-ui/src/main/webapp/javascript/mcf.js

Modified: manifoldcf/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1821236&r1=1821235&r2=1821236&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Tue Jan 16 12:22:23 2018
@@ -3,6 +3,9 @@ $Id$
 
 ======================= 2.10-dev =====================
 
+CONNECTORS-1485: Prevent Form submit on Enter key press
+(Maxence SAUNIER, Kishore Kumar)
+
 CONNECTORS-1482: Improve solr connector handling of include/exclude
 for mime types to be case insenstive and to actually reject documents
 if upstream connector ignores or doesn't call checkMimeTypeIndexable().

Modified: 
manifoldcf/trunk/framework/crawler-ui/src/main/webapp/javascript/mcf.js
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/framework/crawler-ui/src/main/webapp/javascript/mcf.js?rev=1821236&r1=1821235&r2=1821236&view=diff
==============================================================================
--- manifoldcf/trunk/framework/crawler-ui/src/main/webapp/javascript/mcf.js 
(original)
+++ manifoldcf/trunk/framework/crawler-ui/src/main/webapp/javascript/mcf.js Tue 
Jan 16 12:22:23 2018
@@ -530,4 +530,15 @@ $(function(){
     var data = {urlPath: encodeURIComponent(urlPath)};
     window.history.pushState(data,title,'?p=' + encodeURIComponent(urlPath) + 
'&_' + new Date().getTime());
   });
+
+  //Prevent from submit on Enter
+  $(window).keydown(function(e){
+    var key = e.charCode || e.keyCode || 0;
+    if(key == 13) {
+      console.log("Enter on input fields is disabled.");
+      e.preventDefault();
+      return false;
+    }
+  });
+
 });


Reply via email to