From 46b7a29fb71210c51cbff3ad91fd69283d392614 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sat, 7 Nov 2009 15:40:19 -0500 Subject: [PATCH] Fix hints on help pages. Closes issue #141. Update issue #141. It looks like we're actually quite a bit better at figuring out element box data than Firebug is. Aside from actually mispositioning the layout box, Firebug actually chokes on our pages and can't manage to remove the layout guides once it's inserted them. Score one for our hint system, I guess. --- common/content/hints.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/content/hints.js b/common/content/hints.js index bfc531b1..8a309f4d 100644 --- a/common/content/hints.js +++ b/common/content/hints.js @@ -325,9 +325,10 @@ function Hints() //{{{ pageHints.push([elem, text, span, null, elem.style.backgroundColor, elem.style.color, showText]); } - if (doc.body) + let body = doc.body || util.evaluateXPath(["body"], doc).snapshotItem(0); + if (body) { - doc.body.appendChild(fragment); + body.appendChild(fragment); docs.push({ doc: doc, start: start, end: pageHints.length - 1 }); }