Index: compact_forms.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/compact_forms/compact_forms.js,v
retrieving revision 1.6
diff -u -r1.6 compact_forms.js
--- compact_forms.js	6 Aug 2009 20:27:22 -0000	1.6
+++ compact_forms.js	19 Sep 2009 22:52:17 -0000
@@ -1,5 +1,7 @@
 // $Id: compact_forms.js,v 1.6 2009/08/06 20:27:22 sun Exp $
 
+Drupal.compactForms = {};
+
 (function ($) {
 
 /**
@@ -19,7 +21,8 @@
       }
 
       if ($field.val() != '') {
-        $label.fadeOut(1);
+        // Firefox doesn't like .hide() at this place by some reason.
+        $label.css('display', 'none');
       }
 
       $label.parent().addClass('compact-form-wrapper');
@@ -50,6 +53,19 @@
           $label.fadeIn('slow');
         }
       });
+
+      // Chrome adds his passwords after page load, so we should track it
+      // on change.
+      $field.change(function(){
+        if ($(this) != document.activeElement) {
+          if ($(this).val() === '') {
+            $label.fadeIn('fast');
+          }
+          else {
+            $label.css('display', 'none');
+          }
+        }
+      });
     });
   });
 };
@@ -61,4 +77,22 @@
   $('#' + Drupal.settings.compactForms.forms.join(',#'), context).compactForm(Drupal.settings.compactForms.stars, Drupal.settings.compactForms.colons);
 };
 
-})(jQuery);
+/**
+ * Safari fills it's data without triggering any event, after full page load.
+ * So, we have no other way, but to wait a little and than check for data.
+ */
+Drupal.compactForms.fixSafari = function() {
+  $('.compact-form-label').each(function(){
+    $label = $(this);
+    if ($('#' + $label.attr('for')).val() != '') {
+      $label.css('display', 'none');
+    }
+  });
+}
+if ($.browser.safari) {
+  $(window).load(function(){
+    setTimeout("Drupal.compactForms.fixSafari();", 200);
+  });
+}
+
+})(jQuery);
\ No newline at end of file
