Fix for getFilterSubmit not working with <button> submit button in exposed filters form

Created on 24 February 2025, 5 months ago

Problem/Motivation

When using the views_filters_summary module, the submit button of the exposed form is sometimes rendered as a <button> element instead of an <input>. This causes the JavaScript function getFilterSubmit to malfunction, as it only expects an <input>. As a result, the form cannot be submitted properly.

The issue occurs when the exposed form contains a <button> instead of an <input>. This may be caused by a module such as better_exposed_filters or a custom theme.

Proposed resolution

Update the getFilterSubmit function so that it considers both <input> and <button> elements, ensuring compatibility with different form configurations.

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇫🇷France kevinoieau Limoges

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024