Disable 'Select Element' button while element picker is active - #137
Merged
Merged
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
karngyan
force-pushed
the
disable-select-element-btn-during-picker
branch
from
March 27, 2026 18:09
8669000 to
de21e43
Compare
karngyan
force-pushed
the
disable-select-element-btn-during-picker
branch
from
March 27, 2026 18:14
de21e43 to
5b91180
Compare
djanhjo
approved these changes
Mar 27, 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.

When the element picker is activated via the 'Select Element' button in the preview bar, the button is now disabled (visually greyed out with
not-allowedcursor) to prevent re-triggering.Changes
preview-bar-manager.ts: Disable the button directly in the DOM whenstartElementPickerruns, and setdisabledduringbuildElementSelectorControlif the picker is already active (covers re-renders).preview-bar-styles.ts: Added.gist-pb-select-elem-btn:disabledstyle (opacity: 0.4; cursor: not-allowed).The button re-enables automatically when the picker ends since
cleanup()setspickerActive = falseand callsrenderBar().Note
Low Risk
Low risk UI-state change limited to the preview bar; main risk is minor regressions in picker lifecycle/re-render behavior.
Overview
Prevents re-triggering the element picker by disabling the preview bar’s
Select Elementbutton while the picker overlay is active, including across bar re-renders.Adds disabled styling for
.gist-pb-select-elem-btnand introduces new tests covering initial state, activation, Escape-cancel, and successful pick flows to ensure the button is re-enabled when the picker ends.Written by Cursor Bugbot for commit 5b91180. This will update automatically on new commits. Configure here.