ticket #91 attempt 1
This commit is contained in:
parent
43c5a948e8
commit
880e993ed8
1
.dpc/verify_cache.json
Normal file
1
.dpc/verify_cache.json
Normal file
File diff suppressed because one or more lines are too long
@ -172,6 +172,7 @@
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
touch-action: manipulation;
|
||||||
}
|
}
|
||||||
|
|
||||||
.poll-option[disabled] {
|
.poll-option[disabled] {
|
||||||
@ -182,6 +183,10 @@
|
|||||||
border-color: var(--border-light);
|
border-color: var(--border-light);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.poll-option:not([disabled]):active {
|
||||||
|
background-color: var(--bg-card-hover);
|
||||||
|
}
|
||||||
|
|
||||||
.poll-option.chosen {
|
.poll-option.chosen {
|
||||||
border-color: var(--accent);
|
border-color: var(--accent);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,8 @@ import { OptimisticAction } from "./OptimisticAction.js";
|
|||||||
export class PollManager extends OptimisticAction {
|
export class PollManager extends OptimisticAction {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
document.addEventListener("click", (event) => this.onClick(event));
|
this.container = null;
|
||||||
|
document.addEventListener("pointerdown", (event) => this.onClick(event));
|
||||||
document.addEventListener("submit", (event) => this.onSubmit(event), true);
|
document.addEventListener("submit", (event) => this.onSubmit(event), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,7 +43,8 @@ export class PollManager extends OptimisticAction {
|
|||||||
}
|
}
|
||||||
const pollUid = poll.dataset.pollUid;
|
const pollUid = poll.dataset.pollUid;
|
||||||
const optionUid = option.dataset.optionUid;
|
const optionUid = option.dataset.optionUid;
|
||||||
await this.submit(`/polls/${pollUid}/vote`, { option_uid: optionUid }, null, (result) => this.render(poll, result));
|
this.container = poll;
|
||||||
|
await this.submit(`/polls/${pollUid}/vote`, { option_uid: optionUid }, this.container, (result) => this.render(poll, result));
|
||||||
}
|
}
|
||||||
|
|
||||||
render(poll, result) {
|
render(poll, result) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user