From 9eae948c2e31f15d3d9af4032a284e5720234565 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas <21@vingtetun.org> Date: Fri, 17 Jun 2011 23:39:17 +0200 Subject: [PATCH] Replace clearTimeout by clearInterval, otherwise we could end up drawing the page in an infinite loop --- test.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test.js b/test.js index 59d8167a2..a8e7ae6e1 100644 --- a/test.js +++ b/test.js @@ -50,8 +50,7 @@ function gotoPage(num) { } function displayPage(num) { - if (pageNum != num) - window.clearTimeout(pageInterval); + window.clearInterval(pageInterval); document.getElementById("pageNumber").value = num; @@ -94,7 +93,7 @@ function displayPage(num) { if (Fonts[font.name].loading) return; } - clearInterval(pageInterval); + window.clearInterval(pageInterval); var t3 = Date.now();