You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the SQL query editor, the mouse frequently becomes unresponsive after the autocomplete panel appears. Clicks that should place the cursor, select text, or open the context menu (copy/paste) are lost when they land on the autocomplete panel's background, padding, or rounded corners instead of reaching the editor.
This appears to be a remaining edge case after the #1815 fix, which added a local mouse monitor that only dismisses the panel when the click is outside the panel's frame. Clicks that fall inside the panel frame but outside the actual suggestion items are still routed to the panel window and swallowed.
Steps to reproduce
Open a query tab and start typing SQL to trigger autocomplete (e.g. type SEL or SELECT * FROM ).
Wait for the autocomplete panel to appear.
Click on the panel's background, vertical padding, or rounded corner area — not on a suggestion row.
Observe that the panel does not dismiss and the editor does not receive the click.
Expected behavior
Clicking any non-interactive area of the autocomplete panel should dismiss it and return mouse control to the editor.
Root cause
SuggestionController shows the autocomplete list in a child NSPanel ordered above the editor window (SuggestionPanel, level .popUpMenu). The local mouse monitor added in #1815 closes the panel only when event.window !== panel. When the click lies inside the panel frame, AppKit routes the event to the panel window; the monitor returns the event unchanged, and the panel's transparent background swallows it. The editor text view never sees the click.
Suggested fix
Add a background tap gesture to the SwiftUI content so that taps on non-interactive areas of the panel call back to the controller and close the panel.
Add a test that calling model.onBackgroundTap?() clears the controller's model state.
CHANGELOG.md
Add a note under [Unreleased] > Fixed.
Notes
This keeps list-row selection intact because row-level .onTapGesture modifiers take precedence over the parent background gesture.
This fix dismisses the panel on background clicks; placing the cursor at the clicked location will require a second click, which matches the standard autocomplete UX and the intent of Fix reported data grid, editor, and filter UX issues #1815.
What happened?
In the SQL query editor, the mouse frequently becomes unresponsive after the autocomplete panel appears. Clicks that should place the cursor, select text, or open the context menu (copy/paste) are lost when they land on the autocomplete panel's background, padding, or rounded corners instead of reaching the editor.
This appears to be a remaining edge case after the #1815 fix, which added a local mouse monitor that only dismisses the panel when the click is outside the panel's frame. Clicks that fall inside the panel frame but outside the actual suggestion items are still routed to the panel window and swallowed.
Steps to reproduce
SELorSELECT * FROM).Expected behavior
Clicking any non-interactive area of the autocomplete panel should dismiss it and return mouse control to the editor.
Root cause
SuggestionControllershows the autocomplete list in a childNSPanelordered above the editor window (SuggestionPanel, level.popUpMenu). The local mouse monitor added in #1815 closes the panel only whenevent.window !== panel. When the click lies inside the panel frame, AppKit routes the event to the panel window; the monitor returns the event unchanged, and the panel's transparent background swallows it. The editor text view never sees the click.Suggested fix
Add a background tap gesture to the SwiftUI content so that taps on non-interactive areas of the panel call back to the controller and close the panel.
Files to change
LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Model/SuggestionViewModel.swiftvar onBackgroundTap: (() -> Void)?.LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Window/SuggestionController.swiftinit(), setmodel.onBackgroundTap = { [weak self] in self?.close() }.LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/View/SuggestionContentView.swift.background(Color(nsColor: model.themeBackground))with.contentShape(Rectangle()).onTapGesture { model.onBackgroundTap?() }.LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionApplyTests.swiftmodel.onBackgroundTap?()clears the controller's model state.CHANGELOG.md[Unreleased] > Fixed.Notes
.onTapGesturemodifiers take precedence over the parent background gesture.