Disable like button b/w click & backend response (#4869) [deploy]

This commit is contained in:
shaneblackburn 2019-11-22 07:31:40 +13:00 committed by Molly Struve
parent c8903876c6
commit 9d7817b025

View file

@ -75,6 +75,7 @@ function initializeCommentsPage() {
}
thisButt.classList.add('reacted');
thisButt.disabled = true;
function successCb(response) {
var reactionCountSpan = thisButt.children[2];
@ -96,6 +97,7 @@ function initializeCommentsPage() {
getCsrfToken()
.then(sendFetch('reaction-creation', formData))
.then(function (response) {
thisButt.disabled = false;
if (response.status === 200) {
response.json().then(successCb);
}