From 2ceffaa929a7be9b402f29d36f9edbe0faa4e76a Mon Sep 17 00:00:00 2001
From: Arnaud Fontaine <arnaud.fontaine@nexedi.com>
Date: Tue, 10 Dec 2013 16:00:42 +0100
Subject: [PATCH] Support properly HTML5 implicit form submission.

From Chromium 31, pressing enter key to select ListBox page submit the form
through JS (submitFormOnEnter) *and* wrongly on the default button, at the end
following HTML5 behavior (4.10.22.2 Implicit submission).

Conflicts:
	product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log
	product/ERP5/bootstrap/erp5_xhtml_style/bt/revision
---
 .../portal_skins/erp5_xhtml_style/erp5.js.xml                | 2 ++
 product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log        | 5 ++++-
 product/ERP5/bootstrap/erp5_xhtml_style/bt/revision          | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml
index 93b3cbe178..370cd03601 100644
--- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml
+++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml
@@ -187,6 +187,8 @@ function submitFormOnEnter(event, form, method_name, clear_changed_flag, element
       changed = false;\n
     }\n
     form.submit();\n
+    event.preventDefault();\n
+    return false;\n
   }\n
 }\n
 \n
diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log b/product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log
index dd9c4935d1..5ce936f66c 100644
--- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log
+++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log
@@ -1,3 +1,6 @@
+2013-12-10 arnaud.fontaine
+* Support properly HTML5 implicit form submission.
+
 2013-6-20 yusei
 * Fix erp5.js to keep it compatible with jquery 1.4. .prop() is available after jquery 1.6.
 
@@ -387,4 +390,4 @@
 
 2006-06-15 Vincent
 * Initial commit.
-* Valid XHTML1.0 Strict + CSS 2.0.
\ No newline at end of file
+* Valid XHTML1.0 Strict + CSS 2.0.
diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision
index 5f2f16bfff..ecdb865e10 100644
--- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision
+++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision
@@ -1 +1 @@
-1111
+1112
-- 
2.30.9