Skip to content

Fix autocomplete popup key event filtering#15

Open
Jonybien wants to merge 1 commit into
Mudlet:masterfrom
Jonybien:fix-autocomplete-focus-5310
Open

Fix autocomplete popup key event filtering#15
Jonybien wants to merge 1 commit into
Mudlet:masterfrom
Jonybien:fix-autocomplete-focus-5310

Conversation

@Jonybien

Copy link
Copy Markdown

Summary

Fixes a small autocomplete event filtering edge case where key presses may be delivered to the autocomplete popup menu instead of the list widget.

The autocomplete event filter is installed on both menuRef_ and listWidgetRef_, but previously only handled QEvent::KeyPress when the event source was listWidgetRef_. This change handles key presses from either object using the same existing logic.

Why

This is intended to address Mudlet/Mudlet#5310, where autocomplete can steal focus and prevent further typing on Windows.

Change

  • Handle QEvent::KeyPress when obj == listWidgetRef_ || obj == menuRef_.
  • Preserve the existing behavior for typed characters, Escape, Enter/Return/Tab, Backspace, Shift, and navigation keys.
  • No autocomplete architecture changes.

Testing

Not yet manually validated in a full Mudlet Windows build.

Manual Windows validation recommended:

  • Trigger autocomplete in Mudlet’s editor.
  • Continue typing while the popup is visible.
  • Confirm typed characters continue reaching the editor.
  • Confirm Escape closes the popup.
  • Confirm arrow keys navigate suggestions.
  • Confirm Enter/Return/Tab behavior is unchanged.

Related issue: 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.

1 participant