From 2861d35c4b79215cca1abe229833b9cf212d0897 Mon Sep 17 00:00:00 2001 From: Botond Ballo Date: Fri, 1 Sep 2017 13:19:56 -0400 Subject: [PATCH] Bug 1393424 - Don't try to autoscroll in Print Preview mode. r=kats It doesn't work properly anyways due to a more general coordinate-system problem on the Print Preview page (see bug 1393494). MozReview-Commit-ID: D4i2H8z5mtW --- toolkit/content/browser-content.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/toolkit/content/browser-content.js b/toolkit/content/browser-content.js index f478618c1b5b0..ea830c8e8cdb7 100644 --- a/toolkit/content/browser-content.js +++ b/toolkit/content/browser-content.js @@ -139,6 +139,12 @@ var ClickEventHandler = { if (!this._scrollable) return; + // In some configurations like Print Preview, content.performance + // (which we use below) is null. Autoscrolling is broken in Print + // Preview anyways (see bug 1393494), so just don't start it at all. + if (!content.performance) + return; + let domUtils = content.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIDOMWindowUtils); let scrollable = this._scrollable;