Sticky action buttons break after AJAX form replacement
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3582603. -->
Reported by: [arthur_lorenz](https://www.drupal.org/user/3529915)
Related to !771
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>Gin's sticky action buttons in the top bar break after an AJAX form replacement. When a form is rebuilt via AJAX (e.g. clicking "Reset" on a webform build form), Drupal replaces the entire form element in the DOM — including all submit buttons. The new form gets a new ID and the replaced buttons get new <code>id</code> attributes.</p>
<p>However, Gin's sticky buttons in the top bar still hold references to the old form ID and the old button IDs. On the next click, the sticky button tries to find and trigger a button that no longer exists in the DOM, causing the action to fail and the browser to fall back to a full page reload.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<ol>
<li>Enable the Navigation module and Gin admin theme with sticky action buttons.</li>
<li>Go to a webform build form (Structure > Webforms > Edit > Build).</li>
<li>Make a change and click the "Reset" button in the sticky top bar.</li>
<li>The form resets correctly via AJAX (first time works).</li>
<li>Make another change and click "Reset" again.</li>
<li>Instead of an AJAX reset, the page reloads — the sticky button's reference to the original reset button is stale.</li>
</ol>
issue