Fix question panel input focus handling#77
Merged
EdgeTypE merged 1 commit intoJun 18, 2026
Conversation
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.
Summary
This PR fixes an input focus issue in the BDS question panel shown for
<BDS:ask_question>prompts.Previously, text inputs inside
bds-question-panelcould only be focused reliably by clicking the leading icon or thevery beginning of the input field. Clicking other visible areas of the input row often failed to enter typing mode.
The fix improves event isolation and input focusing behavior when the question panel is mounted inside DeepSeek's
native composer area.
Changes
Update question panel event handling:
src/content/ui/QuestionPanel.svelteAdd panel-level pointer/mouse event isolation so DeepSeek's native composer does not steal focus from BDS panel
inputs.
Add a focused input container action so clicking the visible input row focuses the inner input consistently.
Apply the focus behavior to:
Preserve existing click behavior for buttons and options:
Improve input sizing:
Add regression coverage:
tests/integration/ui/QuestionPanel.test.jsNew coverage includes:
Motivation
The question panel is inserted into DeepSeek's native prompt/composer area. That means BDS panel inputs share an
interaction region with DeepSeek's own textarea/contenteditable editor.
DeepSeek's composer can handle pointer and mouse events to focus its own input. Without stronger event isolation,
clicks inside
bds-question-panelmay bubble to the native composer, causing DeepSeek to steal focus back from theBDS input.
This made the visible input row misleading: users could see a full-width input area, but only a small part of it
reliably entered typing mode.
This PR keeps the existing
QuestionPanelstructure and applies a small, local fix similar to the existingevent-isolation approach used by the Deep Research revision panel.
Risk
Low.
The change is limited to
QuestionPanelinput interaction handling and does not change the question data format,answer formatting, injection flow, or public tag contract.
The main risk is accidentally interfering with Svelte delegated click handlers. To reduce that risk, panel-level
isolation only handles pointer/mouse events, and input-container click handling explicitly avoids blocking button
clicks.
Regression tests cover normal option clicks and custom confirm button behavior to ensure existing selection and submit
paths still work.
Testing
Ran targeted QuestionPanel integration tests:
Result:
6 tests passed
Ran full unit test suite:
Result:
58 test files passed
642 tests passed