Bug with transitionend event not correctly removing a CSS class
Use .toggle()
instead of .add()
:
key.classlist.toggle('playing');
instead of
key.classlist.add('playing');
Use .toggle()
instead of .add()
:
key.classlist.toggle('playing');
instead of
key.classlist.add('playing');