Skip to content

Commit 53b7805

Browse files
authored
Merge pull request #11 from RhubarbPHP/patch/RemoveEventProcessingClassOnComplete
Remove event processing class on completion
2 parents 3599cc1 + 730a7e4 commit 53b7805

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Leaves/BackgroundTaskViewBridge.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ bridge.prototype.start = function(){
3636
xmlhttp.onreadystatechange = function () {
3737

3838
// if the ready state is now 4 we've already processed our entire output.
39-
if (xmlhttp.completed || xmlhttp.readyState === 4) {
39+
if (xmlhttp.completed) {
4040
document.body.classList.remove("event-processing");
4141

4242
return;
@@ -53,10 +53,14 @@ bridge.prototype.start = function(){
5353

5454
if (progress.status == "Complete"){
5555
xmlhttp.completed = true;
56+
document.body.classList.remove("event-processing");
57+
5658
this.onComplete(progress);
5759
this.raiseClientEvent("OnComplete", progress);
5860
} else if (progress.status == "Failed"){
5961
xmlhttp.completed = true;
62+
document.body.classList.remove("event-processing");
63+
6064
this.onFailed(progress);
6165
this.raiseClientEvent("OnFailed", progress);
6266
}

0 commit comments

Comments
 (0)