form.js: Ignore buttons again when being asked to render content

This slipped through, as I thought the CSS selector `:input`, which
was used previously, is invalid. Although, it's a jQuery specific
selector -.-, which was also previously used.

fixes #5293
This commit is contained in:
Johannes Meyer 2024-11-28 16:36:01 +01:00
parent 4eadfd0ace
commit ca2778eb46
1 changed files with 3 additions and 1 deletions

View File

@ -83,7 +83,9 @@
if ($container[0].contains(origFocus)
&& origFocus.form
&& ! origFocus.matches(
'input[type=submit], input[type=reset], input[type=button], .autofocus, .autosubmit:not(:hover)'
'input[type=submit], input[type=reset], input[type=button]'
+ ', button[type=submit], button[type=reset], button[type=button]'
+ ', .autofocus, .autosubmit:not(:hover)'
)
) {
this.icinga.logger.debug('Not changing content for ' + containerId + ' form has focus');