Nested fieldsets with descriptions (i.e. when there is a radios field inside a fieldset) cause duplicated formtips

Created on 28 April 2021, over 3 years ago
Updated 8 March 2024, 10 months ago

Problem/Motivation

When there are nested fieldset, for example when a radio buttons element is placed inside a fieldset, there are duplicated formtips icon. One of those trigger the tooltip and the other not.
The issue is caused by the js component, using find to elements with class fieldset-legend from the fieldset element item. This will return all matches, not only the fieldset element itself, but also any nesting one like radios, checkboxes or other nested fieldsets.

Steps to reproduce

Create a custom form with a fieldset and a radios element inside.

Proposed resolution

Refactor the js to filter the fieldset-legend search results by the first element. As the source of the search is the proper fieldset element, the first search result will be the wanted one.

Remaining tasks

Test & review

User interface changes

None

API changes

None

Data model changes

None

🐛 Bug report
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

🇪🇸Spain akalam

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024