From 6a39a1f64e4ed05ea9f2417dd9d51105e5490358 Mon Sep 17 00:00:00 2001 From: rzzf Date: Sat, 14 Feb 2026 16:07:03 +0800 Subject: [PATCH] fix: navigation is blocked after clicking View Source --- app/components/Package/SkillsModal.vue | 1 + app/components/Tooltip/App.vue | 3 +++ app/components/Tooltip/Base.vue | 4 +++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/components/Package/SkillsModal.vue b/app/components/Package/SkillsModal.vue index ff418c649..d67464e5b 100644 --- a/app/components/Package/SkillsModal.vue +++ b/app/components/Package/SkillsModal.vue @@ -170,6 +170,7 @@ function getWarningTooltip(skill: SkillListItem): string | undefined { aria-hidden="true" :text="getWarningTooltip(skill)" to="#skills-modal" + defer > diff --git a/app/components/Tooltip/App.vue b/app/components/Tooltip/App.vue index 91fe8f02d..8b16f2048 100644 --- a/app/components/Tooltip/App.vue +++ b/app/components/Tooltip/App.vue @@ -8,6 +8,8 @@ const props = defineProps<{ interactive?: boolean /** Teleport target for the tooltip content (defaults to 'body') */ to?: string | HTMLElement + /** Whether to defer teleport rendering until after the component is mounted */ + defer?: boolean /** Offset distance in pixels (default: 4) */ offset?: number }>() @@ -52,6 +54,7 @@ const tooltipAttrs = computed(() => { :position :interactive :to + :defer :offset :tooltip-attr="tooltipAttrs" @mouseenter="show" diff --git a/app/components/Tooltip/Base.vue b/app/components/Tooltip/Base.vue index 39b0faf1e..7cbe2013d 100644 --- a/app/components/Tooltip/Base.vue +++ b/app/components/Tooltip/Base.vue @@ -17,6 +17,8 @@ const props = withDefaults( tooltipAttr?: HTMLAttributes /** Teleport target for the tooltip content (defaults to 'body') */ to?: string | HTMLElement + /** Whether to defer teleport rendering until after the component is mounted */ + defer?: boolean /** Offset distance in pixels (default: 4) */ offset?: number /** Strategy for the tooltip - prefer fixed for sticky containers (defaults to 'absolute') */ @@ -46,7 +48,7 @@ const { floatingStyles } = useFloating(triggerRef, tooltipRef, {
- +