We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 315c848 commit cb92f50Copy full SHA for cb92f50
apps/builder/app/canvas/instance-context-menu.ts
@@ -1,8 +1,16 @@
1
import { selectorIdAttribute } from "@webstudio-is/react-sdk";
2
-import { $instanceContextMenu } from "~/shared/nano-states";
+import {
3
+ $instanceContextMenu,
4
+ $textEditingInstanceSelector,
5
+} from "~/shared/nano-states";
6
7
export const subscribeInstanceContextMenu = () => {
8
const handleContextMenu = (event: MouseEvent) => {
9
+ // Allow native context menu when editing text content
10
+ if ($textEditingInstanceSelector.get() !== undefined) {
11
+ return;
12
+ }
13
+
14
const target = event.target as HTMLElement;
15
const element = target.closest(`[${selectorIdAttribute}]`);
16
const selectorId = element?.getAttribute(selectorIdAttribute);
0 commit comments