Fixes event propogation

This commit is contained in:
Mouse Reeve 2021-08-17 08:45:10 -07:00
parent b991510c03
commit 2f93017eaa

View file

@ -138,7 +138,9 @@ let BookWyrm = new class {
* @return {undefined}
*/
toggleAction(event) {
if (event.currentTarget == event.target) {
event.preventDefault();
}
let trigger = event.currentTarget;
let pressed = trigger.getAttribute('aria-pressed') === 'false';
let targetId = trigger.dataset.controls;