Fix tooltips within context menu portals being unreliable (#31129)
* Fix tooltips within context menu portals being unreliable Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update snapshots Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Add test Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
committed by
GitHub
parent
bbb16f7ea9
commit
c7f07f4c29
@@ -12,6 +12,7 @@ import React, { type JSX, type CSSProperties, type RefObject, type SyntheticEven
|
||||
import ReactDOM from "react-dom";
|
||||
import classNames from "classnames";
|
||||
import FocusLock from "react-focus-lock";
|
||||
import { TooltipProvider } from "@vector-im/compound-web";
|
||||
|
||||
import { type Writeable } from "../../@types/common";
|
||||
import UIStore from "../../stores/UIStore";
|
||||
@@ -425,15 +426,17 @@ export default class ContextMenu extends React.PureComponent<React.PropsWithChil
|
||||
onContextMenu={this.onContextMenuPreventBubbling}
|
||||
>
|
||||
{background}
|
||||
<div
|
||||
className={menuClasses}
|
||||
style={menuStyle}
|
||||
ref={this.collectContextMenuRect}
|
||||
role={managed ? "menu" : undefined}
|
||||
{...divProps}
|
||||
>
|
||||
{body}
|
||||
</div>
|
||||
<TooltipProvider>
|
||||
<div
|
||||
className={menuClasses}
|
||||
style={menuStyle}
|
||||
ref={this.collectContextMenuRect}
|
||||
role={managed ? "menu" : undefined}
|
||||
{...divProps}
|
||||
>
|
||||
{body}
|
||||
</div>
|
||||
</TooltipProvider>
|
||||
</div>
|
||||
)}
|
||||
</RovingTabIndexProvider>
|
||||
|
||||
Reference in New Issue
Block a user