Skip to content

Commit 96ca878

Browse files
authored
Merge pull request rpgtkoolmv#151 from rpgtkoolmv/fix_pushretry
Fix can't retry on loading errors on iOS Safari
2 parents a0e927d + b394d2c commit 96ca878

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

js/rpg_core/Graphics.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,10 +339,12 @@ Graphics.printLoadingError = function(url) {
339339
button.style.fontSize = '24px';
340340
button.style.color = '#ffffff';
341341
button.style.backgroundColor = '#000000';
342-
button.onmousedown = button.ontouchstart = function(event) {
343-
ResourceHandler.retry();
342+
button.addEventListener('touchstart', function(event) {
344343
event.stopPropagation();
345-
};
344+
});
345+
button.addEventListener('click', function(event) {
346+
ResourceHandler.retry();
347+
});
346348
this._errorPrinter.appendChild(button);
347349
this._loadingCount = -Infinity;
348350
}

0 commit comments

Comments
 (0)