Sped0n / bridget

Bridget is a minimal Hugo theme for photographers/visual artists, powered by Solid.js.
https://bridget-demo.sped0n.com
MIT License
60 stars 18 forks source link

TypeError: Cannot read properties of undefined (reading 'slideTo') #344

Closed girodimo closed 1 month ago

girodimo commented 1 month ago

Step to reproduce

In Windows Chrome or Firefox, clicking a thumbnail portfolio image produces a .js error in the console. This is true of the demo and one running locally on my computer.

Expected behaviour

A higher res. version of the the photo is expected. The touch event works as expected on Android Chrome however.

Actual Behaviour

Screenshot 2024-06-24

Logs

No response

Addition details

I don't think I have the skills to fix this, although AI tells me that "You might be trying to call slideTo before the slider library (like Swiper.js, Slick, or others) has finished setting up the slider object."

Hugo version

hugo v0.127.0

Bridget version

v2.0.2

OS version

Windows 11

Verify steps

Sped0n commented 1 month ago

By design you should not enter mobile view(being able to swipe) when using desktop browser, are you using a windows device with touchscreen?

girodimo commented 1 month ago

Thanks for the quick response. I see. That is correct. I'm using a laptop with a touch screen. Now that you mention it, the thumbnail images seemed a tad small on my screen. Hmm. the touchscreen is disabled though. Perhaps there's an easy way to pretend to be a desktop browser or disable mobile view?

Sped0n commented 1 month ago

Perhaps there's an easy way to pretend to be a desktop browser or disable mobile view?

Yeah, will try to refactor mobile desktop identification after my vacation.

Sped0n commented 1 month ago

@girodimo Can you check if https://bridget-git-fix344-spedons-projects.vercel.app works as expected?

girodimo commented 1 month ago

@Sped0n Tried it out. It works as expected. The console is showing an error but I think it's vercel related? Anyhow, I was able to use the bridget theme for displaying my portfolio last last week. I got an interview, I'm certain, thanks in part to this. Cheers.

Screenshot 2024-07-11 134104

https://github.com/Sped0n/bridget/assets/168656777/befc0e50-5066-4c61-92d7-5058ffbdae98

Sped0n commented 1 month ago

The console is showing an error but I think it's vercel related?

Probably

I got an interview

Congrats