Skip to content
Snippets Groups Projects
Commit 2b3ff984 authored by Olivia206's avatar Olivia206
Browse files

added keyboard activations

parent c6c759c9
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,13 @@ class Note {
this.call = this.note.querySelector('.note__call');
this.content = this.note.querySelector('.note__content');
this.call.addEventListener('click', this.toggle.bind(this));
this.note.addEventListener('keydown', (event) => {
if (event.keyCode === 13 || event.key === 'Enter' || event.keyCode === 32 || event.key === 'Space') {
event.preventDefault();
this.toggle();
}
});
}
toggle () {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment