Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maccy window intermittently loses ability to change cursor focus to textbox #473

Closed
clanesf opened this issue Oct 4, 2022 · 6 comments
Closed
Labels
needs triaging Further information is requested

Comments

@clanesf
Copy link

clanesf commented Oct 4, 2022

Description:
When pushing the Maccy hotkey, the results window opens up but the text box doesn't get focus and as a result the search doesn't work.

This seems to happen out of nowhere and for some reason if I just randomly click a few of the other icons like the speaker settings, vpn menu, etc. I haven't been able to reliably identify any particular application that needs to be clicked, I just click a few of them and it starts working as expected again.

What's strange is that the Maccy popup windows does indeed get the focus. I can tell this because with each character that I type the dropdown box will select the first item that has that letter in it, but the text doesn't actually appear in the text box.

In Preferences, "Avoid taking application focus" on the Advanced tab is unchecked. Has anyone else experienced this?

Other Applications running with icons next to Maccy include Docker, various stats widgets from https://github.com/exelban/stats, VPN and Magnet

@p0deje
Copy link
Owner

p0deje commented Oct 10, 2022

Can you provide more details? What Maccy version you use? What macOS version? What's the output of running defaults read org.p0deje.Maccy in Terminal.app?

@p0deje p0deje added the needs triaging Further information is requested label Oct 10, 2022
@achou11
Copy link

achou11 commented Oct 31, 2022

I think i have a similar issue where after triggering the hotkey, using the up/down arrow keys doesn't scroll through the options as i'd expect. usually happens only after i've had maccy on in the background for a while and haven't found a way to reproduce yet. can be fixed by fully closing the app and restarting it

Maccy version 0.24.0

@clanesf
Copy link
Author

clanesf commented Dec 8, 2022

So for me I can still use the arrow keys as expected, it's just that the cursor doesn't go to the input field and so typing something to try to search just results in the it randomly jumping around to whatever entry close in the starts with whatever character you enter.

@p0deje
Copy link
Owner

p0deje commented Dec 8, 2022

That sounds like the menu failed to attach the key listener which should never happen. I still need #473 (comment) to understand.

@clanesf
Copy link
Author

clanesf commented Dec 16, 2022

@p0deje - Okay, so I just noticed something and I think this should help you reproduce it. This only happens to me when a webbrowser is open and the cursor on the web page is in the Password text box awaiting input.

If you go to mail.icloud.com and type in your username then move the cursor where you would input your password and hit the hotkey to pull up the menu, the focus of the cursor stays in the password text box on the web page and as a result doesn't filter the search history when you type.

It seems like there is something about the password text box itself that prevents another program from stealing away the focus. I'll bet that this is some kind of security measure to prevent malware from grabbing the focus if you're logging in.

This behavior happens consistently on password fields in both firefox and chrome. Let me know if you're able to reproduce it on your side. Thanks for everything you do here!

Maccy i'm running 0.24.0 (13) - MacOS I'm running Monterey 12.6.1 and here are the outputs of the defaults read org.p0deje.Maccy command

{
    "KeyboardShortcuts_popup" = "{\\"carbonModifiers\\":768,\\"carbonKeyCode\\":9}";
    "NSWindow Frame SUStatusFrame" = "1720 1501 400 134 0 0 3840 2135 ";
    "NSWindow Frame SUUpdateAlert" = "-1270 1572 620 398 -1920 1080 1920 1055 ";
    "NSWindow Frame com.sindresorhus.Preferences.FrameAutosaveName" = "739 229 502 527 0 0 1920 1055 ";
    SUEnableAutomaticChecks = 1;
    SUHasLaunchedBefore = 1;
    SULastCheckTime = "2022-10-12 17:48:44 +0000";
    SUUpdateGroupIdentifier = 109837439;
    WebKitDefaultFontSize = 13;
    WebKitJavaEnabled = 0;
    WebKitJavaScriptEnabled = 0;
    WebKitPluginsEnabled = 0;
    WebKitStandardFont = "-apple-system-font";
    WebKitUserStyleSheetEnabledPreferenceKey = 1;
    WebKitUserStyleSheetLocationPreferenceKey = "/Applications/Maccy.app/Contents/Frameworks/Sparkle.framework/Resources/ReleaseNotesColorStyle.css";
    avoidTakingFocus = 0;
    enabledPasteboardTypes =     (
        "public.tiff",
        "public.utf8-plain-text",
        "public.png",
        "public.file-url"
    );
    history = {length = 42, bytes = 0x62706c69 73743030 a0080000 00000000 ... 00000000 00000009 };
    historySize = 300;
    ignoredPasteboardTypes =     (
        "de.petermaurer.TransientPasteboardType",
        "Pasteboard generator type",
        "com.typeit4me.clipping",
        "com.agilebits.onepassword",
        "net.antelle.keeweb"
    );
    maxMenuItems = 26;
    migrations =     {
        "2020-02-22-history-item-add-copied-at" = 1;
        "2020-02-22-history-item-add-number-of-copies" = 1;
        "2020-04-18-switch-storage-to-core-data" = 1;
        "2020-04-25-allow-custom-ignored-types" = 1;
        "2020-06-19-use-keyboardshortcuts" = 1;
        "2020-09-01-ignore-keeweb" = 1;
        "2021-02-20-allow-to-customize-supported-types" = 1;
        "2021-06-28-add-title-to-history-item" = 1;
        "2021-10-16-remove-dynamic-pasteboard-types" = 1;
        "2022-08-01-rename-suppress-clear-alert" = 1;
    };
    pinTo = top;
    popupPosition = cursor;
    sortBy = lastCopiedAt;
}

@p0deje
Copy link
Owner

p0deje commented Jan 14, 2023

@clanesf Looks like there is something special about password fields. I'm going to push a workaround so that Maccy falls back to "focusless" mode when it can't be focused. Let's see it helps with other edge cases.

@p0deje p0deje closed this as completed in e3bacbb Jan 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triaging Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants