PopClip not working with Obsidian

It used to work intermittently, but now it’s stopped working completely. Every time, I have to use the keyboard shortcut. I’ve restarted Obsidian and PopClip.

Is this a known issue with Obsidian, or other electron apps?

Using Monterey on an M1 MacBook Air. PopClip 2022. Obsidian is up-to-date.

Thanks,
Russell

Popclip works great for me in nearly every app – except Electron apps and some Google products in the browser.

It actually works OK for me in Obsidian but I do hear that some are having trouble with Electron apps.

You could provide a little data to help shed light on it by Option-clicking the PopClip menu bar icon, which will reveal a Debug window. When you select text in Obsidian, what appears in the debug console? You could paste a sample here (click Pause in the debug console to allow copying).

Thanks for the quick response. Here’s the debug info:

06:50:51.5 EventCreate:
06:50:51.5 app.active: 74033 / md.obsidian / Obsidian
06:50:51.5 event.serial: 2224
06:50:51.5 event.windowNumber: 1578
06:50:51.5 global.location.start: (2050.066406, 655.160156)
06:50:51.5 global.modifiers.start: 0x0000000000000000
06:50:51.5 global.time.start: 2023-02-10 13:50:51 +0000
06:50:51.7 ClickDetector:
06:50:51.7 * Mouse activity rejected (A window disappeared when clicking (com.apple.inputmethod.ironwood))
06:50:51.8 EventComplete:
06:50:51.8 app.focused: 74033 / md.obsidian / Obsidian
06:50:51.8 decision: probe 0 probe+require-beam [app:md.obsidian][trigger:multi][cursors:arrow]
06:50:51.8 event.trigger: multi
06:50:51.8 global.cursors: arrow
06:50:51.8 global.location.end: (2050.066406, 655.160156)
06:50:51.8 global.modifiers.end: 0x0000000000000000
06:50:51.8 global.time.end: 2023-02-10 13:50:51 +0000
06:50:51.8 * Excluded by initial (pre-axapi) policy check (probe+require-beam)
06:50:57.2 EventCreate:
06:50:57.2 app.active: 74033 / md.obsidian / Obsidian
06:50:57.2 event.serial: 2225
06:50:57.2 event.windowNumber: 2209
06:50:57.2 global.location.start: (863.039062, 457.980469)
06:50:57.2 global.modifiers.start: 0x0000000000000000
06:50:57.2 global.time.start: 2023-02-10 13:50:57 +0000
06:50:57.3 Log paused

1 Like

Ah yes, now I remember I already started looking into it. It’s something I need to look into on my end. It happens with Notion too.

You might find, when this happens, alt-tabbing away from Obsidian and back helps.

Alt-tabbing, or even quitting and restarting obsidian, didn’t help.

I’ve also noticed it’s working intermittently in Drafts. Here’s is the debug, with one event where it didn’t work, followed by another event that did work.

Looks like the “08:58:43.5 * Excluded by initial (pre-axapi) policy check (probe+require-beam)” is the issue?

08:58:43.4 EventCreate:
08:58:43.4 app.active: 4725 / com.agiletortoise.Drafts-OSX / Drafts
08:58:43.4 event.serial: 70
08:58:43.4 event.windowNumber: 2150
08:58:43.4 global.location.start: (33.628906, 845.000000)
08:58:43.4 global.modifiers.start: 0x0000000000000000
08:58:43.4 global.time.start: 2023-02-10 15:58:43 +0000
08:58:43.5 EventComplete:
08:58:43.5 app.focused: 4725 / com.agiletortoise.Drafts-OSX / Drafts
08:58:43.5 decision: probe 0 probe+require-beam [app:com.agiletortoise.Drafts-OSX][trigger:single][cursors:arrow]
08:58:43.5 event.trigger: single
08:58:43.5 global.cursors: arrow
08:58:43.5 global.location.end: (32.628906, 845.000000)
08:58:43.5 global.modifiers.end: 0x0000000000000000
08:58:43.5 global.time.end: 2023-02-10 15:58:43 +0000
08:58:43.5 * Excluded by initial (pre-axapi) policy check (probe+require-beam)
08:58:43.7 EventComplete:
08:58:43.7 app.clicked: 4725 / com.agiletortoise.Drafts-OSX / Drafts
08:58:43.7 app.focused: 4725 / com.agiletortoise.Drafts-OSX / Drafts
08:58:43.7 decision: discover 1 fallback [app:com.agiletortoise.Drafts-OSX][trigger:multi][cursors:arrow, beam][role:AXTextArea][subrole:][parents:AXWindow, AXTe… (153 chars)
08:58:43.7 element: <NMUIElement: 0x600001a5aeb0> AXTextArea
08:58:43.7 element.enclosingTextControl: <NMUIElement: 0x600001a5aeb0> AXTextArea
08:58:43.7 element.parents: AXTextArea,AXScrollArea,AXSplitGroup,AXWindow,AXApplication
08:58:43.7 element.role: AXTextArea
08:58:43.7 event.trigger: multi
08:58:43.7 global.cursors: arrow,beam
08:58:43.7 global.location.end: (32.628906, 845.000000)
08:58:43.7 global.modifiers.end: 0x0000000000000000
08:58:43.7 global.time.end: 2023-02-10 15:58:43 +0000
08:58:43.7 IntentionFilter:
08:58:43.7 event.intention: Select|Paste
08:58:43.7 Discovery:
08:58:43.7 axapi.textControl.selectedText: <string of length 5>
08:58:43.7 result.plain: <string of length 5>
08:58:43.7 Intel:
08:58:43.7 copyAvailable: yes
08:58:43.7 copyMenuActionExists: yes
08:58:43.7 cutAvailable: yes
08:58:43.7 hasFormattingControls: yes
08:58:43.7 pasteAvailable: yes
08:58:43.7 Population:
08:58:43.7 populationTime: 0.002508044242858887
08:58:43.8 MovementFilter:
08:58:43.8 distance: 0
08:58:43.8 elapsedTime: 0.07602202892303467

Thanks for looking into this.

Regards,
Russell

It looks like it’s failing when the cursor is an arrow and succeeding when it is a beam/caret shape.

It does this because it uses the cursor shape as a heuristic to help work out if the user is actually selecting text. If the cursor is an arrow, it assumes the mouse movement is for something else.

However, I think this needs to become more nuanced – I will be working on this soon.