Fix the Spellbook.dematerialize keyboard toggle

This makes sure that the toggle will not run when typing in an input
or a textarea.