Skip to content

fix: CommentPopover closes when adding image attachments#226

Merged
backnotprop merged 1 commit intomainfrom
fix/comment-popover-image-attachments
Mar 5, 2026
Merged

fix: CommentPopover closes when adding image attachments#226
backnotprop merged 1 commit intomainfrom
fix/comment-popover-image-attachments

Conversation

@backnotprop
Copy link
Owner

Summary

  • CommentPopover's click-outside handler only excluded portals matching z-[90]/z-[100] class strings, but the ImageAnnotator renders at z-[200] — so interacting with it closed the popover
  • Replaced fragile z-index class matching with a data-popover-layer attribute on all overlay portals (AttachmentsButton backdrop/content, ImageAnnotator)
  • Global attachments were unaffected since that AttachmentsButton isn't inside a CommentPopover

Test plan

  • Open a text selection comment popover, click the image button, select a file — popover should stay open through the ImageAnnotator flow
  • Verify global attachments still work
  • Verify clicking outside the CommentPopover (on the document background) still closes it

🤖 Generated with Claude Code

…nnotator

The click-outside handler matched only z-[90]/z-[100] classes, missing the
ImageAnnotator portal at z-[200]. Replace fragile z-index class matching with
a data-popover-layer attribute on all overlay portals.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@backnotprop backnotprop merged commit 983246a into main Mar 5, 2026
3 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