Use "div" tags instead of "button" for menus and actions to prevent "Enter" key from activating them
--- a/src/pyams_skin/viewlet/toolbar/action.pt Wed Oct 11 13:20:00 2017 +0200
+++ b/src/pyams_skin/viewlet/toolbar/action.pt Wed Oct 11 13:41:23 2017 +0200
@@ -1,8 +1,9 @@
-<div class="btn-group">
- <button tal:attributes="class view.css_class;
- data-toggle 'modal' if view.modal_target else None;
- data-ams-url view.get_url()">
+<div class="btn-group"
+ tal:attributes="class view.group_css_class | default">
+ <div tal:attributes="class view.css_class;
+ data-toggle 'modal' if view.modal_target else None;
+ data-ams-url view.get_url()">
<i tal:attributes="class view.label_css_class"></i>
<tal:var content="view.label" />
- </button>
+ </div>
</div>
--- a/src/pyams_skin/viewlet/toolbar/menu.pt Wed Oct 11 13:20:00 2017 +0200
+++ b/src/pyams_skin/viewlet/toolbar/menu.pt Wed Oct 11 13:41:23 2017 +0200
@@ -1,10 +1,10 @@
<div class="btn-group margin-right-2" tal:condition="view.viewlets">
- <button tal:attributes="class view.css_class"
- data-toggle="dropdown">
+ <div tal:attributes="class view.css_class"
+ data-toggle="dropdown">
<i tal:attributes="class view.label_css_class"></i>
<tal:var content="view.label" />
<i class="fa fa-fw fa-caret-down"></i>
- </button>
+ </div>
<ul tal:attributes="class view.menu_css_class">
<tal:loop repeat="viewlet view.viewlets"
content="structure viewlet.render()" />