From b394d2c06293ac4281918db8430d0acb80ee7714 Mon Sep 17 00:00:00 2001 From: krmbn0576 Date: Fri, 23 Mar 2018 16:19:55 +0900 Subject: [PATCH] Fix can't retry on loading errors on iOS Safari --- js/rpg_core/Graphics.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js/rpg_core/Graphics.js b/js/rpg_core/Graphics.js index ea5b22ee..b441b208 100644 --- a/js/rpg_core/Graphics.js +++ b/js/rpg_core/Graphics.js @@ -288,10 +288,12 @@ Graphics.printLoadingError = function(url) { button.style.fontSize = '24px'; button.style.color = '#ffffff'; button.style.backgroundColor = '#000000'; - button.onmousedown = button.ontouchstart = function(event) { - ResourceHandler.retry(); + button.addEventListener('touchstart', function(event) { event.stopPropagation(); - }; + }); + button.addEventListener('click', function(event) { + ResourceHandler.retry(); + }); this._errorPrinter.appendChild(button); this._loadingCount = -Infinity; }