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

[Piano] In Firefox, when using the keyboard to play the piano keys, the 10th note is not playing. #89

Open
sepidehshahi opened this issue Aug 4, 2016 · 5 comments
Labels
Milestone

Comments

@sepidehshahi
Copy link

In Firefox, when using the keyboard to play the piano keys, the 10th note is not playing. Playing the 10th note also causes problems with moving the highlighted area with the arrow keys.

To reproduce the issue:
1-Open the piano in Firefox
2-Bring the focus to the piano
3-Use keyboard buttons to play the piano white keys
4-when you reach the 10th note, it is not playing
5-after pressing the keyboard key for the 10th note, try using the arrow keys to move the highlighted area.

@sepidehshahi sepidehshahi changed the title Piano-Keyboard Interaction in Firefox In Firefox, when using the keyboard to play the piano keys, the 10th note is not playing. Aug 4, 2016
@dinukadesilva dinukadesilva added this to the Piano milestone Aug 5, 2016
@dinukadesilva
Copy link
Collaborator

Hi @sepidehshahi

Could you please verify again when the piano is disabled whether it's after 10th key or 11th key

For me,

  1. 10th key is not working at all in Firefox, But, that doesn't disable the keyboard.
    The reason I found seems the key code is different in firefox
    Firefox - 59
    Chrome - 186
  2. 11th key is working only once and then disables the keyboard as well.
    The reason is Firefox shortcut to open "Quick Find (links only)" is double quotes (keycode 222).
    And then the focus is moved to that text field. As a result, the piano is not working until it's focused again.

image

@sepidehshahi
Copy link
Author

That's right Dinuka. I tried it again. The 10th key is not working at all in the Firefox, however, if the 11th key is not played you can still use the keyboard after playing the 10th key.
Thus, it's the 11th key that disables the keyboard. and as you have found out that's due to opening of the "Quick Find".

@dinukadesilva
Copy link
Collaborator

Thanks @sepidehshahi

@dinukadesilva
Copy link
Collaborator

@sepidehshahi @simonbates

There are two solutions for 10th key,

  1. using evt.key property instead of evt.keyCode. But, there are some compatibility issues in that as described here https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key
  2. Adding a conditional statement in the code to handle that. But, in that case, even the test script has to be updated with a conditional statement.

@dinukadesilva
Copy link
Collaborator

the bug related to the 11th key has been moved to another issue #95

@dinukadesilva dinukadesilva changed the title In Firefox, when using the keyboard to play the piano keys, the 10th note is not playing. [Piano] In Firefox, when using the keyboard to play the piano keys, the 10th note is not playing. Aug 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants