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

Bug in typing ampersand #253

Open
FishnetNewMedia opened this issue Jan 18, 2018 · 0 comments
Open

Bug in typing ampersand #253

FishnetNewMedia opened this issue Jan 18, 2018 · 0 comments

Comments

@FishnetNewMedia
Copy link

When typing an ampersand while results are currently displayed (this.shown == true) results in the ampersand not appearing. The reason is that the keypress event handler runs the move() method, and the move() method prevents the default behavior for keycode 38. There is a difference between keycodes triggered by the keydown and keypress events. keydown keycodes are codes that represent the key(s) pressed. For example, pressing SHIFT+7 will result in two keydown events with keycodes 16 ("SHIFT" key) and 55 ("7" key), however, the keypress returns a character represented by the result of pressing the combined keys. This produces a keycode 38 (ampersand). But keycode 38 is also the keycode result from pressing the up arrow key when passed to the keydown event. Since the events are somewhat redundant, my recommendation is to eliminate this.move() from the keypress event.

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

No branches or pull requests

1 participant