Issue #3642238: Contextual edit toggle only updates the first toolbar tab when the toolbar is rendered twice

Closes #3642238

ContextualToolbarModelView::render() only updated the first toggle (this.$el[0]). When the toolbar is rendered twice (for example by Gin's secondary toolbar on the frontend), the second Edit toggle kept the hidden class. This updates every element in this.$el, as the Backbone version did before #3203920.

Tested on Drupal 11.4.12 with Gin 5.0.16 and gin_toolbar 3.0.3 (same code in core there): the Edit button shows in both toolbars and toggles edit mode on and off.

Merge request reports

Loading
Loading