[assets] Fix broken actions for focus and checkbox:

This commit should address the following two comments:

- https://github.com/mouse-reeve/bookwyrm/pull/883#discussion_r609172258
- https://github.com/mouse-reeve/bookwyrm/pull/883#discussion_r609174513
This commit is contained in:
Fabien Basmaison 2021-04-08 11:37:14 +02:00
parent 83bd417878
commit 2f90b4ce66

View file

@ -156,14 +156,14 @@ let BookWyrm = new class {
}
// Check checkbox, if appropriate.
let checkbox = trigger.dataset['controls-checkbox'];
let checkbox = trigger.dataset.controlsCheckbox;
if (checkbox) {
this.toggleCheckbox(checkbox, pressed);
}
// Set focus, if appropriate.
let focus = trigger.dataset['focus-target'];
let focus = trigger.dataset.focusTarget;
if (focus) {
this.toggleFocus(focus);