fix(ui): prevent text selection and ghost images during references slider drag
Some checks failed
Build & Deploy / 🔍 Prepare (push) Has been cancelled
Build & Deploy / 🧪 QA (push) Has been cancelled
Build & Deploy / 🏗️ Build (push) Has been cancelled
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled

This commit is contained in:
2026-06-15 15:28:21 +02:00
parent 30047cb1c4
commit a47d378521

View File

@@ -133,14 +133,16 @@ export function ReferencesSlider(props: ReferencesSliderProps) {
<Link <Link
href={`/${locale}/referenzen/${ref.slug}`} href={`/${locale}/referenzen/${ref.slug}`}
data-testid="reference-tile" data-testid="reference-tile"
draggable={false}
onClick={(e) => { onClick={(e) => {
if (dragDistanceRef.current > 15) { if (dragDistanceRef.current > 15) {
e.preventDefault(); e.preventDefault();
} }
}} }}
className="block relative aspect-[16/10] bg-neutral-800 rounded-2xl overflow-hidden mb-5 border border-white/5 shadow-2xl" className="block relative select-none aspect-[16/10] bg-neutral-800 rounded-2xl overflow-hidden mb-5 border border-white/5 shadow-2xl"
> >
<Image <Image
draggable={false}
src={imgSrc} src={imgSrc}
alt={ref.title} alt={ref.title}
fill fill