Jump to content

disable left right keyboard arrows on gallery block lightbox?

Recommended Posts

Posted

Site URL: https://vibraphone-spinach-2age.squarespace.com/

PW: Adameus1

If you go to "Folio 2" and click "HOBOKEN", it lists properties.  When you click on one, we get a lightbox.  Since I cannot get a caption on there, f you move left and right you do not know where the properties are.  So I either need captions OR no left right.  It looks right now but the keyboard arrows still work.

  • Replies 1
  • Views 356
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted (edited)

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.

 

 

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.