From 34890c712965ed27c8845df7c0ba45bc72ee04eb Mon Sep 17 00:00:00 2001 From: "scott%scott-macgregor.org" Date: Tue, 9 Dec 2003 06:35:40 +0000 Subject: [PATCH] Bug #227903 --> Autocomplete popup fails to show comment field for LDAP results. git-svn-id: svn://10.0.0.236/trunk@150164 18797224-902f-48f8-a5cc-f745e15eee43 --- .../compose/content/MsgComposeCommands.js | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/mozilla/mail/components/compose/content/MsgComposeCommands.js b/mozilla/mail/components/compose/content/MsgComposeCommands.js index f57534da6a4..2c9a3231a32 100644 --- a/mozilla/mail/components/compose/content/MsgComposeCommands.js +++ b/mozilla/mail/components/compose/content/MsgComposeCommands.js @@ -1408,7 +1408,19 @@ function ComposeLoad() } AddMessageComposeOfflineObserver(); - AddDirectoryServerObserver(true); + AddDirectoryServerObserver(true); + + try { + // XXX: We used to set commentColumn on the initial auto complete column after the document has loaded + // inside of setupAutocomplete. But this happens too late for the first widget and it was never showing + // the comment field. Try to set it before the document finishes loading: + if (sPrefs.getIntPref("mail.autoComplete.commentColumn")) + document.getElementById('addressCol2#1').showCommentColumn = true; + } + catch (ex) { + // do nothing... + } + if (gLogComposePerformance) sMsgComposeService.TimeStamp("Start initializing the compose window (ComposeLoad)", false); @@ -2588,9 +2600,8 @@ function setupAutocomplete() // honor it as well // try { - if (sPrefs.getIntPref("mail.autoComplete.commentColumn")) { - document.getElementById('addressCol2#1').showCommentColumn = - true; + if (sPrefs.getIntPref("mail.autoComplete.commentColumn")) { + document.getElementById('addressCol2#1').showCommentColumn = true; } } catch (ex) { // if we can't get this pref, then don't show the columns (which is