summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Pyrzak <guy.pyrzak@gmail.com>2010-02-18 19:53:30 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2010-02-18 19:53:30 +0100
commitaebbdc07d4d5c58260f7fd4f815ec9b1e8311b4e (patch)
tree21a00a76aefea79b088f7c7b99d6f1825efe2751
parent9e044b55c14320849fec284fa5452e9385153ec4 (diff)
downloadbugzilla-aebbdc07d4d5c58260f7fd4f815ec9b1e8311b4e.tar.gz
bugzilla-aebbdc07d4d5c58260f7fd4f815ec9b1e8311b4e.tar.xz
Bug 546719: When reopening a Resolved Duplicated bug in IE, JS error stops the correct page behavior
r/a=mkanat
-rw-r--r--js/field.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/js/field.js b/js/field.js
index 011d4da52..0f1779b32 100644
--- a/js/field.js
+++ b/js/field.js
@@ -316,8 +316,11 @@ function showDuplicateItem(e) {
YAHOO.util.Dom.removeClass('duplicate_settings',
'bz_default_hidden');
YAHOO.util.Dom.addClass('dup_id_discoverable', 'bz_default_hidden');
- dup_id.focus();
- dup_id.select();
+ // check to make sure the field is visible or IE throws errors
+ if( ! YAHOO.util.Dom.hasClass( dup_id, 'bz_default_hidden' ) ){
+ dup_id.focus();
+ dup_id.select();
+ }
}
else {
YAHOO.util.Dom.addClass('duplicate_settings', 'bz_default_hidden');