From d850c1991ae7a04e5cfbf1d0ddda6a43d24cb0fe Mon Sep 17 00:00:00 2001 From: nod_ <nod_@598310.no-reply.drupal.org> Date: Thu, 27 Jun 2024 09:40:34 +0200 Subject: [PATCH] Issue #3291764 by Gauravvvv, baldwinlouie, Utkarsh_33, kostyashupenko, ranjith_kumar_k_u, eugene.brit, Farnoosh, rhiss, smustgrave, podarok, mkdok, bnjmnm, candelas, saganakat: The [0] hatch in misc/vertical-tabs.js causes issues if there are multiple forms with vertical tabs (cherry picked from commit 8c9ff22228ec81b805bb4fdf83e78b378e008960) --- core/misc/vertical-tabs.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/misc/vertical-tabs.js b/core/misc/vertical-tabs.js index 67a9b3ea4de0..3b628bf2fba2 100644 --- a/core/misc/vertical-tabs.js +++ b/core/misc/vertical-tabs.js @@ -196,8 +196,11 @@ }) .end() .show() - .siblings(':hidden.vertical-tabs__active-tab')[0].value = - this.details.attr('id'); + .siblings(':hidden.vertical-tabs__active-tab') + .get() + .forEach((hidden) => { + hidden.value = this.details.attr('id'); + }); this.details.attr('open', true); this.item.addClass('is-selected'); // Mark the active tab for screen readers. -- GitLab