Multiple form elements in DOM prevents functionality from working

Created on 14 October 2024, 3 months ago

We have the situation that there are multiple form elements in the DOM.

The following TODO is present in the code:

// TODO: This fails if there are multiple forms.
var $form = $('form').first();

In our case the other form comes first and hence, the functionality is broken. We fixed this by setting $form as follows:

var $form = $('.field--widget-yoast-seo-widget').closest('form');

This might not be the best way, but at least we at least have the functionality working again.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇳🇱Netherlands Marty2081

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

Comments & Activities

Production build 0.71.5 2024