fix(workspace-search): set search buttons to type='button'#2748
Merged
Conversation
mikeharv
approved these changes
Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2510.
The workspace-search next/previous/close buttons are created by the private
createBtnhelper without an explicittype, so each<button>defaults totype="submit". When a Blockly workspace is embedded in a<form>, clicking any of them submits the form — exactly as @admalledd reported, along with the one-line fix.Change
createBtnnow setsbtn.type = 'button'. This single helper backs all three buttons (next, previous, close), so one line covers every case.createBtn()regression test asserting the three buttons exposetype === 'button'. It fails on currentmain(jsdom reports the default'submit') and passes with the fix.Checks (Node 22)
npm run build --workspace=@blockly/plugin-workspace-search— OKnpm run test --workspace=@blockly/plugin-workspace-search— 17 passingnpm run lintandnpm run format:check— cleanThanks to @admalledd for the report and the suggested fix.
Disclosure: this change was prepared with AI assistance and reviewed by me before submitting. I ran the checks above in a network-isolated container and published a signed, re-runnable record of that run: https://northset-oss.github.io/verification-pilot/. Contributor self-run — not a maintainer verification.