refine context menu and goview url import
This commit is contained in:
parent
52f5cce272
commit
08543ad714
@ -54,7 +54,13 @@ export function ContextMenu(props: {
|
||||
};
|
||||
|
||||
const close = () => onClose();
|
||||
const onAnyPointerDown = () => close();
|
||||
|
||||
const onAnyPointerDown = (e: PointerEvent) => {
|
||||
// Allow right-click to open another context menu without closing first.
|
||||
// (Browsers fire pointerdown before contextmenu.)
|
||||
if (e.button === 2) return;
|
||||
close();
|
||||
};
|
||||
const onAnyWheel = () => close();
|
||||
const onScroll = () => close();
|
||||
const onBlur = () => close();
|
||||
|
||||
@ -45,6 +45,9 @@ function pickUrlLikeInner(input: unknown, depth: number): string {
|
||||
'srcUrl',
|
||||
'sourceUrl',
|
||||
'playUrl',
|
||||
'file',
|
||||
'fileUrl',
|
||||
'fileSrc',
|
||||
// iframe-ish
|
||||
'iframeUrl',
|
||||
'iframeSrc',
|
||||
@ -97,6 +100,9 @@ function pickUrlLikeInner(input: unknown, depth: number): string {
|
||||
'sources',
|
||||
'sourceList',
|
||||
'urlList',
|
||||
'srcList',
|
||||
'playList',
|
||||
'playlist',
|
||||
// widget-ish wrappers seen in exports
|
||||
'iframe',
|
||||
'video',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user