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 will not stay open if cursor is inside a password field as of macOS 14.4 #743

Closed
2 tasks done
jnubz opened this issue Mar 6, 2024 · 14 comments
Closed
2 tasks done
Labels
bug Something isn't working nsmenu Limitation of NSMenu

Comments

@jnubz
Copy link

jnubz commented Mar 6, 2024

Before Submitting Your Bug Report

  • I have verified that there isn't already an issue reporting the same bug to prevent duplication.
  • I have seen the FAQ.

Maccy Version (see 'About' window)

0.30.0

macOS Version

14.4

Maccy Settings

{
    "KeyboardShortcuts_delete" = "{\\"carbonKeyCode\\":51,\\"carbonModifiers\\":2048}";
    "KeyboardShortcuts_pin" = "{\\"carbonModifiers\\":2048,\\"carbonKeyCode\\":35}";
    "KeyboardShortcuts_popup" = "{\\"carbonModifiers\\":2560,\\"carbonKeyCode\\":18}";
    "LaunchAtLogin__hasMigrated" = 1;
    "NSStatusItem Preferred Position Item-0" = 5897;
    "NSWindow Frame SUStatusFrame" = "1520 961 400 134 0 0 3440 1415 ";
    "NSWindow Frame SUUpdateAlert" = "2570 492 620 398 1920 0 1920 1055 ";
    "NSWindow Frame com.sindresorhus.Preferences.FrameAutosaveName" = "1499 543 542 436 0 0 3440 1415 ";
    "NSWindow Frame com.sindresorhus.Settings.FrameAutosaveName" = "3037 380 542 436 1920 0 1920 1055 ";
    SUEnableAutomaticChecks = 1;
    SUHasLaunchedBefore = 1;
    SULastCheckTime = "2024-03-06 15:27:25 +0000";
    SUUpdateGroupIdentifier = 72295520;
    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";
    enabledPasteboardTypes =     (
        "public.tiff",
        "public.html",
        "public.rtf",
        "public.png",
        "public.file-url",
        "public.utf8-plain-text"
    );
    history = {length = 42, bytes = 0x62706c69 73743030 a0080000 00000000 ... 00000000 00000009 };
    ignoreEvents = 0;
    ignoredPasteboardTypes =     (
        "de.petermaurer.TransientPasteboardType",
        "Pasteboard generator type",
        "com.typeit4me.clipping",
        "com.agilebits.onepassword",
        "net.antelle.keeweb"
    );
    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;
        "2022-11-14-add-html-rtf-to-supported-types" = 1;
        "2023-01-22-add-regexp-search-mode" = 1;
    };
    pasteByDefault = 1;
    removeFormattingByDefault = 1;
}

Description

When manually invoking or using the keyboard shortcut, the clipboard pop up will only appear for a split second if the focus is inside a browser password field. This happens in Chrome, Safari and Firefox. Maybe others.

This began during the beta testing of 14.4, but I didn't want to break NDA.

Steps to Reproduce

  1. Go to a website login page ( Facebook.com or Gmail.com can be used to reproduce)
  2. Click password field and ensure the cursor is blinking in the field
  3. try to activate Maccy clipboard menu. It appears for a second, but there is no way to use it.

Current workaround is to click away from all text fields, load up the clipboard item you need, then manually paste in the password field.

@jnubz jnubz added the bug Something isn't working label Mar 6, 2024
@p0deje
Copy link
Owner

p0deje commented Mar 6, 2024

Another workaround is to enable "Avoid taking application focus" in advanced preferences.

I'll see if there is a better way to handle password fields, the current logic no longer seems to work:

// Sometimes even though we attempt to activate Maccy,
// it doesn't get active. This happens particularly with
// password fields in Safari. Let's at least allow
// search to work in these cases.
// See https://github.com/p0deje/Maccy/issues/473.

@p0deje p0deje changed the title Maccy will sot stay open if cursor is inside a password field as of macOS 14.4 Maccy will not stay open if cursor is inside a password field as of macOS 14.4 Mar 6, 2024
@jnubz
Copy link
Author

jnubz commented Mar 7, 2024

Thank you! Enabling "Avoid taking application focus" fixed it. Are there any features I might be used to using that this will change? Just curious to know why I might prefer it having app focus.

Thanks again. Maccy has been one of my favorite tools for almost 2 years now.

@p0deje
Copy link
Owner

p0deje commented Mar 10, 2024

Are there any features I might be used to using that this will change?

you are losing keyboard helpers such as Korean input handling or accented letters (when you hold, for example, "e" key for few seconds)

@p0deje
Copy link
Owner

p0deje commented Mar 10, 2024

Something tells the menu to close itself right after opening. It could be some macOS security mechanism and I'm not sure how to work it around.

Frankly, at this point, I feel like I need to rewrite Maccy from NSMenu to NSPopover and be done with all the menu-related hacks. This is however a massive effort so not sure when I might start working on this.

@p0deje p0deje added the nsmenu Limitation of NSMenu label Mar 11, 2024
@anupsabraham
Copy link

anupsabraham commented Mar 13, 2024

I've been reopening maccy using spotlight search every time this happens. That seems to work even though it involves a lot of keypresses.

For me, this is happening in iTerm as well, not just for password inputs.

@jagibson
Copy link

I'm experiencing this in iTerm2 after updating to 14.4. Enabling "Avoid taking application focus" seems to be a good workaround.

@p0deje
Copy link
Owner

p0deje commented Mar 21, 2024

I'm experiencing this in iTerm2 after updating to 14.4. Enabling "Avoid taking application focus" seems to be a good workaround.

This is when entering password in a command such as sudo, right? In other cases it works correctly, doesn't it?

@anupsabraham
Copy link

This is when entering password in a command such as sudo, right? In other cases it works correctly, doesn't it?

No. Happening every time when I try to paste something onto iTerm2

@p0deje
Copy link
Owner

p0deje commented Mar 22, 2024

No. Happening every time when I try to paste something onto iTerm2

What version of macOS/Maccy/iTerm2? Can you please record a small video showing the problem?

@jagibson
Copy link

jagibson commented Apr 12, 2024

Here's a video

Screen.Recording.2024-04-12.at.11.26.29.AM.mov

You can see the keyboard shortcut working normally in Notes and in Terminal, but not iTerm2.

MacOS 14.4.1 (Apple Silicon)
iTerm2 3.4.23
Maccy 0.30.0 (29)

@p0deje
Copy link
Owner

p0deje commented Apr 12, 2024

There could be something in your iTerm2 configuration that prevents the popup from showing. Can you try enabling "Avoid taking application focus" in Maccy Advanced preferences?

@jcugat
Copy link

jcugat commented Apr 26, 2024

I had the same issue with iTerm2 as @jagibson and can confirm that enabling Avoid taking application focus fixes the issue @p0deje 👍

@jagibson
Copy link

I can also confirm that enabling "Avoid taking application focus" made the issue go away.

@p0deje
Copy link
Owner

p0deje commented Sep 16, 2024

Fixed in 2.0

@p0deje p0deje closed this as completed Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working nsmenu Limitation of NSMenu
Projects
None yet
Development

No branches or pull requests

5 participants