From 4e1dbe3e67fb076cb528348247f4f9ab3ec669ec Mon Sep 17 00:00:00 2001 From: "gavin%gavinsharp.com" Date: Tue, 20 Sep 2005 00:19:00 +0000 Subject: [PATCH] Bug 209037: Bookmarklet "javascript:window.find()" is broken, patch by Martijn Wargers , r=mconnor git-svn-id: svn://10.0.0.236/trunk@180623 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/toolkit/content/finddialog.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mozilla/toolkit/content/finddialog.js b/mozilla/toolkit/content/finddialog.js index e6bb166e625..d6ebadc9cd9 100644 --- a/mozilla/toolkit/content/finddialog.js +++ b/mozilla/toolkit/content/finddialog.js @@ -107,13 +107,13 @@ function onLoad() // get the find instance var arg0 = window.arguments[0]; - if (arg0 instanceof window.opener.nsFindInstData) { + // If the dialog was opened from window.find(), + // arg0 will be an instance of nsIWebBrowserFind + if (arg0 instanceof Components.interfaces.nsIWebBrowserFind) { + gFindInst = arg0; + } else { gFindInstData = arg0; gFindInst = gFindInstData.webBrowserFind; - } else { - // If the dialog was opened from window.find(), findInst will be an - // nsISupports interface, so QueryInterface anyway to nsIWebBrowserFind. - gFindInst = arg0.QueryInterface(Components.interfaces.nsIWebBrowserFind); } fillDialog();