Skip to content

Commit

Permalink
fix: disabling portal
Browse files Browse the repository at this point in the history
  • Loading branch information
kkmch committed Oct 24, 2023
1 parent a990a67 commit 3c60f50
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/components/SharePopover/SharePopover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,11 @@ export class SharePopover extends React.PureComponent<SharePopoverInnerProps, Sh
isOpen: false,
};
tooltipId: string;
buttonRef: React.RefObject<HTMLButtonElement>;

constructor(props: SharePopoverInnerProps) {
super(props);

this.tooltipId = getUniqId();
this.buttonRef = React.createRef();
}

render() {
Expand Down Expand Up @@ -150,16 +148,13 @@ export class SharePopover extends React.PureComponent<SharePopoverInnerProps, Sh
tooltipClassName={b('tooltip', tooltipClassName)}
onClick={this.handleClick}
tooltipId={this.tooltipId}
focusTrap={!openByHover}
restoreFocusRef={this.buttonRef}
autoFocus={!openByHover}
disablePortal
onOpenChange={this.onOpenChange}
>
{({onClick}) => (
<button
className={b('container', switcherClassName)}
onClick={onClick}
ref={this.buttonRef}
aria-expanded={openByHover ? undefined : isOpen}
aria-controls={this.tooltipId}
aria-describedby={this.tooltipId}
Expand Down

0 comments on commit 3c60f50

Please sign in to comment.