From 87de347a8e3b98cf58188a353ae73a1c6f0f66d8 Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Mon, 14 Jul 2008 19:00:35 +0000 Subject: [PATCH] fixed PageLoad autoevent --- content/events.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/content/events.js b/content/events.js index cc31a8ac..370ef8dc 100644 --- a/content/events.js +++ b/content/events.js @@ -447,8 +447,10 @@ liberator.Events = function () //{{{ // code which should happen for all (also background) newly loaded tabs goes here: - var url = liberator.buffer.URL; - var title = liberator.buffer.title; + // loaded page can be not current (e.g. background tab loaded) + // so we should use defaultView from event object, not liberator.buffer. + var url = doc.defaultView.location.href; + var title = doc.defaultView.title; //update history if (url && liberator.history)