Jump to content

disable left right keyboard arrows on gallery block lightbox?

Recommended Posts

  • Replies 1
  • Views 310
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

I left a solution in the other ticket that you created for adding captions for each lightbox image. 

Preventing left and right key action is pretty hard to accomplish since any script that you add will execute after the squarespace scripts. This means if you put an event listener for key press first the action that squarespace defined will execute, then your script. Also the url changes on left/right arrow press. 

Also by dragging the images in lightbox to left or right will trigger the item change, so that needs to be tackled too. I suggest you the solution I've added in your other ticket.

Edited by joseph81

Jozsef Kerekes - Front-end developer and Squarespace enthusiast
My Blog: https://ui-workarounds.com
If you like my answer, please give me an upvote/like. Highly appreciated.

 

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.