fix: Raise the portaled menu above the Agent panel
This commit is contained in:
@@ -83,6 +83,9 @@ describe('MessageBubble', () => {
|
||||
clientX: 30,
|
||||
clientY: 40,
|
||||
});
|
||||
expect(
|
||||
screen.getByRole('menu', { name: '消息右键菜单' }).style.zIndex,
|
||||
).toBe('60');
|
||||
fireEvent.click(screen.getByRole('menuitem', { name: '复制文本' }));
|
||||
|
||||
await waitFor(() =>
|
||||
|
||||
@@ -136,7 +136,11 @@ export function MessageBubbleRightClickMenu({
|
||||
className="image-canvas-editor__context-menu"
|
||||
role="menu"
|
||||
aria-label={target.kind === 'text' ? '消息右键菜单' : '消息素材右键菜单'}
|
||||
style={{ left: position?.x ?? x, top: position?.y ?? y }}
|
||||
style={{
|
||||
left: position?.x ?? x,
|
||||
top: position?.y ?? y,
|
||||
zIndex: 60,
|
||||
}}
|
||||
onContextMenu={(event) => event.preventDefault()}
|
||||
>
|
||||
{target.kind === 'text' ? (
|
||||
|
||||
Reference in New Issue
Block a user