Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix keypress bug #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix keypress bug #27

wants to merge 1 commit into from

Conversation

sch
Copy link

@sch sch commented Jan 12, 2015

Love this book! Lots of hard-won knowledge in there.

There's a bug around detecting which key was pressed in order to switch between language modes — currently any keypress will evaluate to false on this conditional, so space-bar-ing down the page is a little fraught.

This change plucks out the letter on keyup and only performs the toggle when the switch key is pressed. Also updates the .ruby-version since it looks like that was only bumped in the Gemfile.

There's a bug around detecting which key was pressed in order to switch between
javascript and coffeescript modes, allowing any keypress to scroll down the
page. This commit opts to compare key strings on keyup to toggle only on
a match.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant