Skip to content

Fix: autocomplete popup must not take editor focus - #19

Closed
saurav-codes wants to merge 1 commit into
Mudlet:masterfrom
saurav-codes:fix-autocomplete-focus
Closed

saurav-codes wants to merge 1 commit into
Mudlet:masterfrom
saurav-codes:fix-autocomplete-focus

Conversation

@saurav-codes

Copy link
Copy Markdown

Brief overview of changes

The autocomplete popup called setFocus on its list on every update; on some systems (reported on Windows) this moves keyboard focus away from the editor so further typing is blocked.

This sets Qt::NoFocus and WA_ShowWithoutActivating on the popup and list, removes the explicit focus grab, and intercepts editor key presses while the popup is visible so Up/Down/PageUp/PageDown still navigate the list and Enter/Tab/Escape work as before.

References

Fixes Mudlet/Mudlet#5310

Assisted-by: Grok Build:grok

Set NoFocus and WA_ShowWithoutActivating on the autocomplete popup and
its list, remove the explicit focus grab when the list updates, and
intercept key presses on the editor component while the popup is
visible so navigation keys still operate the list.

Fixes Mudlet/Mudlet#5310
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Autocomplete steals window focus, prevents further typing

1 participant