From 5c6a924f1e246d1c4492aa27082fe05cb163473f Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sun, 7 Nov 2010 10:30:54 -0500 Subject: [PATCH] Take into account the possibility that the statusbar may have been hidden by strange means. Closes issue #123. --- common/content/commandline.js | 7 +++++-- common/content/statusline.js | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/common/content/commandline.js b/common/content/commandline.js index 163f95da..182ebbd7 100644 --- a/common/content/commandline.js +++ b/common/content/commandline.js @@ -44,8 +44,11 @@ const CommandWidgets = Class("CommandWidgets", { getGroup: function (value) this.activeGroup.commandline, onChange: function (elem) { if (elem.inputField != dactyl.focus) { - elem.selectionStart = elem.value.length; - elem.selectionEnd = elem.value.length; + try { + elem.selectionStart = elem.value.length; + elem.selectionEnd = elem.value.length; + } + catch (e) {} } if (elem.collapsed) elem.focus(); diff --git a/common/content/statusline.js b/common/content/statusline.js index 79fdfc66..35dea094 100644 --- a/common/content/statusline.js +++ b/common/content/statusline.js @@ -32,7 +32,7 @@ const StatusLine = Module("statusline", { } }, - get visible() !this.statusBar.collapsed, + get visible() !this.statusBar.collapsed && !this.statusBar.hidden, /** * Update the status bar to indicate how secure the website is: