1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

Use timeout for font ready callback to avoid intermittent chrome failures.

This commit is contained in:
Brendan Dahl 2012-08-06 08:51:20 -07:00
parent 485f8ebe27
commit 69eca3c50f

View file

@ -418,7 +418,8 @@ var FontLoader = {
document.documentElement.removeEventListener(
'pdfjsFontLoad', checkFontsLoaded, false);
callback();
// Use timeout to fix chrome intermittent failures on font loading.
setTimeout(callback, 0);
return true;
}