Skip to content

Fix clm content reminder#403

Draft
Tishasoumya-02 wants to merge 4 commits into
mainfrom
fix-clm-content-reminder
Draft

Fix clm content reminder#403
Tishasoumya-02 wants to merge 4 commits into
mainfrom
fix-clm-content-reminder

Conversation

@Tishasoumya-02

@Tishasoumya-02 Tishasoumya-02 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Reason why this happened : The Document Review menu is a react-aria Popover + Dialog, which portals its content to document.body by rac-design. Volto's Toolbar component decides when to close its "more" menu by detecting interaction outside the menu, and it does this through two independent mechanisms:

  1. handleClickOutside — a mousedown listener on document. It only exempts clicks inside the collapsed toolbar bar, so a click on the body-portaled popover counts as "outside" and closes the menu.

  2. The menu container's onBlur — closes the menu when focus moves to an element not contained in the toolbar window. react-aria's Dialog moves focus into the (body-portaled) popover on open, which trips this immediately.

Because the popover lives outside the toolbar's DOM subtree, both closers fire, so the menu closed before the user could interact.

The fix I went with here - Since auto-moves focus into the popover on open. no (no focus pull) + isNonModal (no modal focus trap) = focus never leaves toolbar = onBlur never closes menu. But this breaks the assistive Tech. Not sure if we want that.

More efficient but would need customisation of the toolbar and stopping the onBlur from propagation if (e.relatedTarget?.closest('.review-popover')) return; and it did work ,keeping everything else as it was before.

There were some changes recently in the Toolbar.jsx which caused this issue: plone/volto#8019

@iFlameing / @danalvrz

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