From f3d194b00b411f43d61370252c39ec6fed6465d5 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Thu, 21 Oct 2010 16:16:14 -0400 Subject: [PATCH] Fix finder on view-source: pages on recent Gecko 2. --- common/content/finder.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/common/content/finder.js b/common/content/finder.js index a940b8f5..9360fce8 100644 --- a/common/content/finder.js +++ b/common/content/finder.js @@ -621,9 +621,11 @@ const RangeFind = Class("RangeFind", { }, deselect: function () { - this.selection.removeAllRanges(); - if (this.initialSelection) - this.selection.addRange(this.initialSelection); + if (this.selection) { + this.selection.removeAllRanges(); + if (this.initialSelection) + this.selection.addRange(this.initialSelection); + } }, get selectionController() this.docShell