diff --git a/packages/editor/src/editor/EditorApp.tsx b/packages/editor/src/editor/EditorApp.tsx index 9fa1697..97b25ea 100644 --- a/packages/editor/src/editor/EditorApp.tsx +++ b/packages/editor/src/editor/EditorApp.tsx @@ -73,6 +73,13 @@ export function EditorApp() { const closeContextMenu = useCallback(() => setCtxMenu(null), []); + // Selection parity: if selection changes via hotkeys/toolbar, close any open context menu. + useEffect(() => { + if (!ctxMenu) return; + setCtxMenu(null); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [state.selection.ids]); + useEffect(() => { const onKeyDown = (e: KeyboardEvent) => { dispatch({ type: 'keyboard', ctrl: e.ctrlKey || e.metaKey, space: e.code === 'Space' || state.keyboard.space }); diff --git a/packages/sdk/src/core/goview/convert.ts b/packages/sdk/src/core/goview/convert.ts index 11831c0..1c440a0 100644 --- a/packages/sdk/src/core/goview/convert.ts +++ b/packages/sdk/src/core/goview/convert.ts @@ -118,6 +118,9 @@ function isIframe(c: GoViewComponentLike): boolean { // Keep this fairly conservative; video/image are handled separately. return ( k.includes('embed') || + k === 'frame' || + // Some forks label iframe-like widgets as "Frame" / "FrameCommon". + k.includes('frame') || k.includes('webview') || k.includes('html') || k.includes('browser') || @@ -248,7 +251,7 @@ function looksLikeIframeOption(option: unknown): boolean { // Prefer explicit iframe-ish keys when option is an object. if (typeof option === 'object') { const o = option as Record; - if ('iframeUrl' in o || 'iframeSrc' in o || 'embedUrl' in o) return true; + if ('iframeUrl' in o || 'iframeSrc' in o || 'embedUrl' in o || 'frameUrl' in o || 'frameSrc' in o) return true; // Some exports store raw HTML instead of a URL. if ('srcdoc' in o || 'srcDoc' in o) return true; @@ -288,6 +291,8 @@ function looksLikeVideoOption(option: unknown): boolean { 'videoUrl' in o || 'videoSrc' in o || 'playUrl' in o || + 'srcUrl' in o || + 'sourceUrl' in o || 'liveUrl' in o || 'streamUrl' in o || 'mp4' in o ||