Skip to content

Commit

Permalink
Backport Fix sidebar popup click outside (#5520) to main (#5535)
Browse files Browse the repository at this point in the history
Co-authored-by: Miu Razvan <[email protected]>
  • Loading branch information
ichim-david and razvanMiu authored Dec 16, 2023
1 parent 822f3f7 commit a4e79f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/volto/news/5519.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Replace createRef with useRef in SidebarPopup
[razvanMiu]
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const DEFAULT_TIMEOUT = 500;
const SidebarPopup = (props) => {
const { children, open, onClose, overlay } = props;

const asideElement = React.createRef();
const asideElement = React.useRef();

const handleClickOutside = (e) => {
if (asideElement && doesNodeContainClick(asideElement.current, e)) return;
Expand Down

0 comments on commit a4e79f0

Please sign in to comment.