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
{{ message }}
This repository was archived by the owner on Jun 11, 2026. It is now read-only.
When a new suggestion window opens and mouse is inside window mouseEntered causes that currently written text is hijacked and replaced with suggestion. The proper solution is to mark down lastMouseOverView and only mark it as selected when user moves mouse (need to change window settings to acceptmousemoved). Safari behaves the same.
The issue with hijack text I have with MKLocalSearchCompleter as it can give suggestions that don't match the text user has typed
override func mouseEntered(with event: NSEvent) {
lastMouseEnteredView = event.trackingArea?.userInfo?[SuggestionWindowController.trackerKey] as? NSView
// NOTE: THIS CAUSES ISSUE DURING TYPING AND MOUSE IS OVER SUGGESTION WINDOW
//userSetSelectedView(lastMouseEnteredView)
}
override func mouseMoved(with event: NSEvent) {
guard selectedView == nil, let lastMouseEnteredView else { return }
userSetSelectedView(lastMouseEnteredView)
}
/* The mouse has left one of our child image views. Set the selection to no selection and send action
*/
override func mouseExited(with event: NSEvent) {
lastMouseEnteredView = nil
guard let win = self.window, win.isVisible else { return }
userSetSelectedView(nil)
}
When a new suggestion window opens and mouse is inside window mouseEntered causes that currently written text is hijacked and replaced with suggestion. The proper solution is to mark down lastMouseOverView and only mark it as selected when user moves mouse (need to change window settings to acceptmousemoved). Safari behaves the same.
The issue with hijack text I have with MKLocalSearchCompleter as it can give suggestions that don't match the text user has typed
https://github.com/jbrayton/CustomMenus/blob/ebb88c3c87e9461410882fab31c91dde4bef9309/Suggestion List Window/SUGSuggestionListWindowController.swift#L316