mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-19 16:11:05 +00:00
Fixes event propogation
This commit is contained in:
parent
b991510c03
commit
2f93017eaa
1 changed files with 3 additions and 1 deletions
|
@ -138,7 +138,9 @@ let BookWyrm = new class {
|
||||||
* @return {undefined}
|
* @return {undefined}
|
||||||
*/
|
*/
|
||||||
toggleAction(event) {
|
toggleAction(event) {
|
||||||
event.preventDefault();
|
if (event.currentTarget == event.target) {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
let trigger = event.currentTarget;
|
let trigger = event.currentTarget;
|
||||||
let pressed = trigger.getAttribute('aria-pressed') === 'false';
|
let pressed = trigger.getAttribute('aria-pressed') === 'false';
|
||||||
let targetId = trigger.dataset.controls;
|
let targetId = trigger.dataset.controls;
|
||||||
|
|
Loading…
Reference in a new issue