Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
Sign in to follow this  
MsDalfo

How can I remove project pagination with arrow keys?

Question

Posted (edited)

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.

Edited by MsDalfo
clarifying title

Share this post


Link to post

1 answer to this question

Recommended Posts

  • 0
Posted (edited)

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

Edited by MsDalfo
clarity

Share this post


Link to post

Create an account or sign in to comment

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

Sign in to follow this  

×
×
  • Create New...