[Pkg-mozext-commits] [wot] 77/226: Fixed issue of FF Nightly with strange behaviour of event object
David Prévot
taffit at moszumanska.debian.org
Fri May 1 00:35:36 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository wot.
commit 438b022e4be68761882fd6ed38d2953b7e7a06b2
Author: Sergey Andryukhin <sorgoz at yandex.com>
Date: Tue Apr 2 12:04:21 2013 +0300
Fixed issue of FF Nightly with strange behaviour of event object
---
content/popup.js | 16 +++++++++-------
content/warning.js | 7 +++++--
2 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/content/popup.js b/content/popup.js
index 2bc33a9..45f67a5 100644
--- a/content/popup.js
+++ b/content/popup.js
@@ -323,12 +323,14 @@ var wot_popup =
onmouseover: function(event)
{
try {
- if (!wot_util.isenabled() || !wot_prefs.show_search_popup ||
- !event || !event.view) {
+
+ var event_view = event.view; // workaround for FF Nightly 22.0a1 (when this object is accessed second time, it is null)
+
+ if (!wot_util.isenabled() || !wot_prefs.show_search_popup || !event_view) {
return;
}
- var content = event.view.document;
+ var content = event_view.document;
if (!content) {
return;
@@ -373,16 +375,16 @@ var wot_popup =
layer.style.height = popupheight + "px";
layer.style.width = wot_popup.width + "px";
- var height = event.view.innerHeight - wot_popup.barsize;
- var width = event.view.innerWidth - wot_popup.barsize;
+ var height = event_view.innerHeight - wot_popup.barsize;
+ var width = event_view.innerWidth - wot_popup.barsize;
if (height < popupheight || width < wot_popup.width) {
wot_popup.hidelayer(content);
return
}
- var vscroll = event.view.pageYOffset;
- var hscroll = event.view.pageXOffset;
+ var vscroll = event_view.pageYOffset;
+ var hscroll = event_view.pageXOffset;
// more accurate way to calc position
// got from http://javascript.ru/ui/offset
diff --git a/content/warning.js b/content/warning.js
index c77f3fa..40edd94 100644
--- a/content/warning.js
+++ b/content/warning.js
@@ -551,11 +551,14 @@ var wot_warning =
{
try {
- if (!event || !event.view) {
+
+ var event_view = event.view;
+
+ if (!event_view) {
return;
}
- var content = event.view.document;
+ var content = event_view.document;
if (!content) {
return;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/wot.git
More information about the Pkg-mozext-commits
mailing list