Escape does not close the comment thread popover #34

Open
opened 2026-04-21 14:22:09 +00:00 by AhmedHanafy725 · 1 comment
Member

Opening a comment thread by clicking its marker shows a popover with replies and Resolve / Delete actions. Pressing Escape should dismiss the popover but nothing happens — the user has to click the X button or click outside the whiteboard container.

Root cause: showCommentPopover in comments.js has no keydown handler. Only showInputPopover (the new-comment textarea) listens for Escape.

Fix: when the thread popover opens, attach a document-level keydown handler that calls hidePopover() on Escape; detach it in hidePopover so it doesn't leak.

Opening a comment thread by clicking its marker shows a popover with replies and Resolve / Delete actions. Pressing Escape should dismiss the popover but nothing happens — the user has to click the X button or click outside the whiteboard container. Root cause: `showCommentPopover` in `comments.js` has no keydown handler. Only `showInputPopover` (the new-comment textarea) listens for Escape. Fix: when the thread popover opens, attach a document-level keydown handler that calls `hidePopover()` on Escape; detach it in `hidePopover` so it doesn't leak.
Author
Member

Pull request opened: #35

Pull request opened: https://forge.ourworld.tf/lhumina_code/hero_whiteboard/pulls/35
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_whiteboard#34
No description provided.