Jump to content

How can I remove project pagination with arrow keys?

Recommended Posts

Hi. I'm updating my portfolio website. I'm running into a frustrating thing that happened the last time (and I just muscled my way through it by writing elsewhere and c+p into the browser), but I'm going to ask for help this time.

Flatiron (and maybe other themes) have the feature of the nav arrows appearing at the top right when you're within a page, letting you page through projects within the same tree of the site map. I hid those arrows with code years ago with:

.switcher {display:none;}

But the arrow keys on the keyboard can still be used as a shortcut to achieve the same thing as clicking those arrows. It drives me nuts, because if I hit left or right on the keyboard as I'm writing in-browser (as I often do to get to different parts of a sentence or paragraph), the site takes me to another project page, and I lose my work since I haven't saved.

How do I remove this feature, at least until I'm done updating my website?

I've already "broken the seal" on the Developer Mode and logged in with the FTP, so that's certainly an option. I'm sure it's just a line or two of JavaScript I need to comment out...

Thank you for your help. And I'm sorry if this has been answered before; it's kind of difficult to search for.

Link to comment
  • Replies 1
  • Views 648
  • Created
  • Last Reply

Ahhhhhhh! I figured it out. 😅  See attached code screencap (Settings>Advanved>Developer Mode; this was pulled down using an FTP in the site.js file).

I'm sure there is more code I should be commenting out/removing (and please let me know if you know more than I do), but commenting out these event listeners broke it enough that the keyboard arrow keys no longer work to page through projects.

I hope I help some future googler with this thing that's been a pain in my ass for literal years... every time I update my site, anyway.

Screen Shot 2020-07-07 at 2.18.47 AM.png

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.