hideCaret
Makes the caret of the focused element transparent, leaving the focus itself alone.
The element is found through nested shadow roots, since document.activeElement stops at a shadow host and the caret belongs to the element inside it. Re-applying before a restore keeps the ORIGINAL value, so two hides and one restore still leave the element as it was found; a hide on a different element first restores the one an unrestored hide left behind.
Import:
import { hideCaret } from 'obsidian-integration-testing';Signature:
function hideCaret(options: HideCaretOptions | undefined): Promise<HiddenCaret>Parameters:
| Parameter | Type | Description |
|---|---|---|
options |
HideCaretOptions | undefined | Transport and vault overrides. |
Returns: Promise<HiddenCaret> — A Promise that resolves to the HiddenCaret.
Links to this page: