Restoring keyboard navigation. Adding some code to prevent accidental page switches while searching.