Skip to content

complete the relationship as you type - #32

Merged
pfefferle merged 1 commit into
mainfrom
fix/xfn-autocomplete
Sep 24, 2026
Merged

pfefferle merged 1 commit into
mainfrom
fix/xfn-autocomplete

Conversation

@pfefferle

Copy link
Copy Markdown
Owner

Typing a relationship and pressing Enter did nothing. The token field adds what you typed, so "fr" came in as "fr", and sanitizeXfn() drops everything that is not in the XFN vocabulary, so it vanished without a word. You had to press the arrow keys or click a suggestion to get anywhere.

Two props on the token field fix it: the first match is preselected, so "fr" becomes friend and "co-w" becomes co-worker, and a word that is no relationship stays in the field instead of being swallowed.

Checked in the editor: "fr" + Enter gives friend, "co-w" + Enter gives co-worker, "nonsense" + Enter adds nothing and stays in the field.

@pfefferle
pfefferle merged commit 6396660 into main Sep 24, 2026
4 checks passed
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