Feed: clicking into the inline comment textarea navigates away to the note view #34
Labels
No labels
bug
discussion
enhancement
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
edufeed/edufeed-app#34
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
In the feed, clicking the comment icon on a note card correctly opens the inline comment section. But clicking into the comment textarea navigates to the note detail view instead of focusing the input, so you can't write your comment in the feed.
Cause (confirmed in code)
src/lib/components/notes/NoteCard.svelte:role="button"withonclick={handleCardClick}→goto(neventHref).handleCardClickonly bails whene.target.closest('button, a')matches.{#if showComments}→CommentList→CommentInputwith a<textarea>) does not. A<textarea>is neither a button nor an anchor, so the click bubbles to the card and triggers navigation.Fix
Stop propagation on the comment section wrapper (like the toolbar row does) and/or broaden the
closest()guard to includetextarea, input, form, [contenteditable].Acceptance criteria
Fixed on branch
feat/feed-issues-34-37(commit2f31d06d). The card click/keydown handlers now ignore interactive targets (textarea, input, contenteditable, and the whole comment section) — also fixes Space/Enter while typing a comment triggering navigation. Verified in the browser: clicking into the expanded comment section no longer navigates; card body click still does. Component tests added.