Skip to content

Commit

Permalink
XWIKI-22523: Hitting the Enter key in fields on XWiki pages opens the…
Browse files Browse the repository at this point in the history
… 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 d20f671)
  • Loading branch information
Sereza7 authored and surli committed Nov 22, 2024
1 parent 5bda874 commit 3238e07
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
*#
#macro(displayMenu $id $icon $menuContent $titleKey $titleAsLabel $actionUrl $extraAttribute)
<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" != '')
href="$actionUrl"
#else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#set ($togglerTextAlternative = "<span class='sr-only'>$escapetool.xml($services.localization.render('web.hierarchy.toggler.label.parents', [$pathData.get($openToIndex).label])) </span>")
#end
#set ($treeToggle = "<button class='dropdown-toggle' data-toggle='dropdown'>" +
#set ($treeToggle = "<button class='dropdown-toggle' type='button' data-toggle='dropdown'>" +
$togglerTextAlternative +
"$services.icon.renderHTML('caret-down')</button>")
$services.icon.renderHTML('caret-down') +
"</button>")
#set ($treeNavigation = "$treeToggle<div class='dropdown-menu'>#documentTree($treeParams)</div>")
#end
#end
Expand Down

0 comments on commit 3238e07

Please sign in to comment.