Skip to content

Commit 77b9dbf

Browse files
authored
fix(form): dont bind events to dropdown search inputs
The field selector in forms also fetches dropdowns search fields which are not supposed to be form inputs. Each fetched fields is bound to events. especially the blur event. This leads into the situation that jquery 3.4 runs into a "maximum callstack exceeded" bug, because the blur recursively triggers another blur for the same field again when the dropdown was initialized before the form was initialized. Its not happening when the dropdown is initialized after the form was initialized because the search dropdown possible hasn't created the internally used search field. The event system handling seems to changed slightly between jquery 3.3.1 and 3.4, because it was not happening the error is not happening with older jqery versions. However the field selector was ever since fetching too many fields. This PR now makes sure unnecessary input fields are not fetched by the form which removes the error.
1 parent df26dde commit 77b9dbf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/definitions/behaviors/form.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1571,7 +1571,7 @@ $.fn.form.settings = {
15711571
selector : {
15721572
checkbox : 'input[type="checkbox"], input[type="radio"]',
15731573
clear : '.clear',
1574-
field : 'input, textarea, select',
1574+
field : 'input:not(.search), textarea, select',
15751575
group : '.field',
15761576
input : 'input',
15771577
message : '.error.message',

0 commit comments

Comments
 (0)