Prevent Workbench preview from reloading when links are clicked
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3582273. --> Reported by: [balintbrews](https://www.drupal.org/user/613760) Related to !825 >>> <h3 id="overview">Overview</h3> <p>When a user clicks a link within the Workbench preview, the iframe reloads and renders the entire Workbench application inside itself.</p> <h3 id="proposed-resolution">Proposed resolution</h3> <p>Intercept link click events within the preview iframe and prevent their default behavior so that link clicks have no effect. The Canvas UI already has a solution for its preview mode, so we can borrow that.</p> <h3 id="ui-changes">User interface changes</h3> <p>Avoid this:</p> <p><img src="https://www.drupal.org/files/issues/2026-03-30/Screenshot%202026-03-25%20at%207.56.58%E2%80%AFPM.png" alt="Workbench rendering the entire app inside the preview iframe"></p> <p><em>Reported by <strong>@mayur-sose</strong> in <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/canvas/-/work_items/3580394" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/canvas/-/work_items/3580394</a></span>.</em></p>
issue