From 940d3dd8ff7a3fbf11248298e502ea60aaa48331 Mon Sep 17 00:00:00 2001 From: jrburke Date: Thu, 3 Feb 2011 16:57:22 -0800 Subject: [PATCH] Sometimes in at least FF4 beta the storage events seem to not trigger, so also manually trigger via event dispatch. Also give the wrapper a minimum height so that error messages in the panel show up with the panel sized correctly. --- dev/scripts/accounts.js | 8 ++++++++ dev/share/panel/style.css | 6 +----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/dev/scripts/accounts.js b/dev/scripts/accounts.js index dda6be9..2e66915 100644 --- a/dev/scripts/accounts.js +++ b/dev/scripts/accounts.js @@ -100,6 +100,12 @@ function (storage, dispatch, rdapi) { changed: function () { store.accountChanged = (new Date()).getTime(); + //Force the onchange events to occur. Sometimes the storage + //events do not fire? + if (opener && !opener.closed) { + dispatch.pub('accountsChanged', null, opener); + } + dispatch.pub('accountsChanged'); }, onChange: function (action) { @@ -112,6 +118,8 @@ function (storage, dispatch, rdapi) { action(); } }, false); + //Also use direct notification in case storage events fail. + dispatch.sub('accountsChanged', action); } }, //Some extensions mess with localStorage, so in that case, fall back to diff --git a/dev/share/panel/style.css b/dev/share/panel/style.css index 55b6525..0d2b698 100644 --- a/dev/share/panel/style.css +++ b/dev/share/panel/style.css @@ -24,6 +24,7 @@ body { width: 400px; max-width: 400px; position: relative; + min-height: 180px; height: 100%; } @@ -731,11 +732,6 @@ div.status td { vertical-align: center; } -#statusSettings { - position: relative; - height: 180px; -} - #statusCaptcha { line-height: normal; }