fix: Issue with person page focus

This commit is contained in:
Aleksi Lassila
2024-05-30 17:41:54 +03:00
parent 9b08885afa
commit 4c3dde4464
2 changed files with 5 additions and 1 deletions

View File

@@ -2,6 +2,7 @@
import { Selectable } from '../selectable'; import { Selectable } from '../selectable';
import classNames from 'classnames'; import classNames from 'classnames';
import { onMount } from 'svelte'; import { onMount } from 'svelte';
import { PLATFORM_WEB } from '../constants';
let showOverlay = false; let showOverlay = false;
let x = 0; let x = 0;
@@ -36,6 +37,8 @@
}; };
onMount(() => { onMount(() => {
if (!PLATFORM_WEB) return;
const interval = setInterval(() => { const interval = setInterval(() => {
if (element && showOverlay) { if (element && showOverlay) {
updateOverlayPosition(element); updateOverlayPosition(element);

View File

@@ -41,7 +41,8 @@
class="px-32 py-16 space-y-16" class="px-32 py-16 space-y-16"
> >
<div class="flex space-x-8"> <div class="flex space-x-8">
<div <Container
on:enter={scrollIntoView({ vertical: 128 })}
class="bg-center bg-cover rounded-xl w-44 h-64 cursor-pointer" class="bg-center bg-cover rounded-xl w-44 h-64 cursor-pointer"
style={`background-image: url("${TMDB_POSTER_SMALL + person.profile_path}")`} style={`background-image: url("${TMDB_POSTER_SMALL + person.profile_path}")`}
/> />