Skip to content
Snippets Groups Projects
Commit 3238e072 authored by Sereza7's avatar Sereza7 Committed by Simon Urli
Browse files

XWIKI-22523: Hitting the Enter key in fields on XWiki pages opens the hamburger content menu

* Added type=`button` on the edit form buttons (that are not here for form submission) so that we avoid mistakenly triggering them implicitely.

(cherry picked from commit d20f671d)
parent 5bda8744
No related branches found
No related tags found
No related merge requests found
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
*# *#
#macro(displayMenu $id $icon $menuContent $titleKey $titleAsLabel $actionUrl $extraAttribute) #macro(displayMenu $id $icon $menuContent $titleKey $titleAsLabel $actionUrl $extraAttribute)
<div class="btn-group" id="$id"> <div class="btn-group" id="$id">
<#if ("$!actionUrl" == '')button#{else}a#end class="btn btn-default#if ("$!actionUrl" == '') dropdown-toggle#end" title="$services.localization.render($titleKey)"## <#if ("$!actionUrl" == '')button type="button"#{else}a#end class="btn btn-default#if ("$!actionUrl" == '') dropdown-toggle#end" title="$services.localization.render($titleKey)"##
#if ("$!actionUrl" != '') #if ("$!actionUrl" != '')
href="$actionUrl" href="$actionUrl"
#else #else
......
...@@ -227,9 +227,10 @@ ...@@ -227,9 +227,10 @@
## If the rootId is null, this means that the root is the home. Which means that we're on the first tree, which doesn't show exactly the same thing as the others. ## If the rootId is null, this means that the root is the home. Which means that we're on the first tree, which doesn't show exactly the same thing as the others.
#set ($togglerTextAlternative = "<span class='sr-only'>$escapetool.xml($services.localization.render('web.hierarchy.toggler.label.parents', [$pathData.get($openToIndex).label])) </span>") #set ($togglerTextAlternative = "<span class='sr-only'>$escapetool.xml($services.localization.render('web.hierarchy.toggler.label.parents', [$pathData.get($openToIndex).label])) </span>")
#end #end
#set ($treeToggle = "<button class='dropdown-toggle' data-toggle='dropdown'>" + #set ($treeToggle = "<button class='dropdown-toggle' type='button' data-toggle='dropdown'>" +
$togglerTextAlternative + $togglerTextAlternative +
"$services.icon.renderHTML('caret-down')</button>") $services.icon.renderHTML('caret-down') +
"</button>")
#set ($treeNavigation = "$treeToggle<div class='dropdown-menu'>#documentTree($treeParams)</div>") #set ($treeNavigation = "$treeToggle<div class='dropdown-menu'>#documentTree($treeParams)</div>")
#end #end
#end #end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment