[READ-ONLY] a fast, modern browser for the npm registry

fix: navigation is blocked after clicking View Source (#1496)

authored by

rzzf and committed by
GitHub
2744fd49 2c1f3138

+7 -1
+1
app/components/Package/SkillsModal.vue
··· 170 170 aria-hidden="true" 171 171 :text="getWarningTooltip(skill)" 172 172 to="#skills-modal" 173 + defer 173 174 > 174 175 <span class="i-lucide:circle-alert w-3.5 h-3.5 text-amber-500" /> 175 176 </TooltipApp>
+3
app/components/Tooltip/App.vue
··· 8 8 interactive?: boolean 9 9 /** Teleport target for the tooltip content (defaults to 'body') */ 10 10 to?: string | HTMLElement 11 + /** Whether to defer teleport rendering until after the component is mounted */ 12 + defer?: boolean 11 13 /** Offset distance in pixels (default: 4) */ 12 14 offset?: number 13 15 }>() ··· 52 54 :position 53 55 :interactive 54 56 :to 57 + :defer 55 58 :offset 56 59 :tooltip-attr="tooltipAttrs" 57 60 @mouseenter="show"
+3 -1
app/components/Tooltip/Base.vue
··· 17 17 tooltipAttr?: HTMLAttributes 18 18 /** Teleport target for the tooltip content (defaults to 'body') */ 19 19 to?: string | HTMLElement 20 + /** Whether to defer teleport rendering until after the component is mounted */ 21 + defer?: boolean 20 22 /** Offset distance in pixels (default: 4) */ 21 23 offset?: number 22 24 /** Strategy for the tooltip - prefer fixed for sticky containers (defaults to 'absolute') */ ··· 46 48 <div ref="triggerRef" class="inline-flex"> 47 49 <slot /> 48 50 49 - <Teleport :to="props.to"> 51 + <Teleport :to="props.to" :defer> 50 52 <Transition 51 53 enter-active-class="transition-opacity duration-150 motion-reduce:transition-none" 52 54 leave-active-class="transition-opacity duration-100 motion-reduce:transition-none"