Skip to content

fix: only show preview when hovering cover and cursor is still#17

Open
hotsno wants to merge 2 commits into
hayase-app:masterfrom
hotsno:master
Open

fix: only show preview when hovering cover and cursor is still#17
hotsno wants to merge 2 commits into
hayase-app:masterfrom
hotsno:master

Conversation

@hotsno
Copy link
Copy Markdown
Contributor

@hotsno hotsno commented May 13, 2026

Before:

Screen.Recording.2026-05-12.at.8.28.16.PM_compressed.mp4

After:

Screen.Recording.2026-05-13.at.1.40.30.AM_compressed.mp4

@hotsno
Copy link
Copy Markdown
Contributor Author

hotsno commented May 13, 2026

I am using role='none' because setting it as a button would make it selectable via d-pad, but there's no real reason to since the parent div already is. Not sure if this is ok.

@hotsno hotsno changed the title Add delay to card hover and hover only over cover fix: only show preview when hovering cover and cursor is still May 13, 2026
function onmousemove () {
if (hidden) {
clearTimeout(stillTimer)
stillTimer = setTimeout(() => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

absolutely not. use css for this!!! WTF

{#if !hidden}
<PreviewCard {media} />
{/if}
<div class='text-white p-4 cursor-pointer shrink-0 relative pointer-events-auto [content-visibility:auto] [contain-intrinsic-size:auto_152px_auto_290.4px]' class:![content-visibility:visible]={!hidden} class:z-40={!hidden} use:click={onclick}>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this breaks touch, pen and controller input!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants