Skip to content

Pass clicks through to interactive elements in LP mode#380

Merged
ebullient merged 1 commit intomainfrom
claude/vigilant-edison
Mar 30, 2026
Merged

Pass clicks through to interactive elements in LP mode#380
ebullient merged 1 commit intomainfrom
claude/vigilant-edison

Conversation

@ebullient
Copy link
Copy Markdown
Owner

Changes

  • src/main.ts: Modified click handler to pass through clicks on interactive elements (inputs, buttons, selects, links, etc.) instead of always moving the editor cursor. This allows Meta Bind inputs and other interactive elements inside admonitions to work properly in Live Preview mode.

  • ad-test-vault/10-metabind.md: Added comprehensive test document demonstrating Meta Bind input compatibility with admonitions, including toggles, dropdowns, and text inputs in both ad-* blocks and native callouts.

  • ad-test-vault/00-index.md: Added reference to new Meta Bind test document.

Behavior

Clicks on interactive elements within admonitions are now passed through to the element itself, while clicks on non-interactive areas still move the editor cursor to the admonition source (matching native Obsidian callout behavior).

In Live Preview, clicking an admonition moves the cursor to its source.
This intercepted clicks on interactive child elements (Meta Bind inputs,
dropdowns, checkboxes), making those plugins unusable inside admonitions.

Now checks whether the click target is an interactive element (input,
button, select, label, tabindex, etc.) before jumping to source — matching
the behavior of native Obsidian callouts.

Fixes #361

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ebullient ebullient merged commit 86d9d80 into main Mar 30, 2026
1 check passed
@ebullient ebullient deleted the claude/vigilant-edison branch March 30, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant