From 3f688917af480d8c9b018a338e495ce8f0c37d42 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas <21@vingtetun.org> Date: Sat, 14 May 2011 12:28:27 +0200 Subject: [PATCH] Bug 656876 - Panning is broken if sidebars are collapsed [r=mfinkle] --- mobile/chrome/content/browser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile/chrome/content/browser.js b/mobile/chrome/content/browser.js index 3a69845307b3..64dc24c4380a 100644 --- a/mobile/chrome/content/browser.js +++ b/mobile/chrome/content/browser.js @@ -920,7 +920,7 @@ var Browser = { function visibility(aSidebarRect, aVisibleRect) { let width = aSidebarRect.width; aSidebarRect.restrictTo(aVisibleRect); - return aSidebarRect.width / width; + return (aSidebarRect.width ? aSidebarRect.width / width : 0); } if (!dx) dx = 0;