fix 468774 compose prefs ui doesn't show non-default font
authorShimoda Hiroshi <piro@p.club.ne.jp>
Thu, 15 Jan 2009 11:22:45 -0800
changeset 1653 66d414c9616e
parent 1652 f197c0bd1296
child 1654 33289583f87e
push id1321
push userbienvenu@nventure.com
push dateThu, 15 Jan 2009 19:22:53 +0000
treeherdercomm-central@66d414c9616e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs468774
fix 468774 compose prefs ui doesn't show non-default font
mail/components/preferences/compose.js
--- a/mail/components/preferences/compose.js
+++ b/mail/components/preferences/compose.js
@@ -212,16 +212,19 @@ var gComposePane = {
       var localFonts = enumerator.EnumerateAllFonts(localFontCount);
       for (var i = 0; i < localFonts.length; ++i)
       {
         if (localFonts[i] != "")
           fontsList.appendItem(localFonts[i], localFonts[i]);
       }
     }
     catch(e) { }
+    // Choose the item after the list is completely generated.
+    var preference = document.getElementById(fontsList.getAttribute("preference"));
+    fontsList.value = preference.value;
    },
 
    restoreHTMLDefaults: function()
    {
      // reset throws an exception if the pref value is already the default so
      // work around that with some try/catch exception handling
      try {
        document.getElementById('msgcompose.font_face').reset();