Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
To reproduce this issue:
- Log in to the site and let Firefox save your username and password (for ONE user only)
- Log out of the site and return to the login form. Note that this is pre-filled with both username and password.
- Clear out the password field
- Set focus to the username field
- Remove focus from the username field
Firefox has now restored the pre-filled password, but Compact Forms has also displayed the label. I know this is one of those edge cases but I have attached a really easy patch for this as described in http://drupal.org/node/461918#comment-2286342
Comment | File | Size | Author |
---|---|---|---|
#3 | compact_forms-DRUPAL-6--1.ff-autocomplete.3.patch | 1.55 KB | sun |
#2 | compact_forms_firefox_autofill2.patch | 1.16 KB | mstrelan |
compact_forms_firefox_autofill.patch | 1.03 KB | mstrelan | |
compact-forms-firefox.png | 4.45 KB | mstrelan |
Comments
Comment #1
sunThanks!
2 minor style issues:
- Missing period.
- Only variables containing jQuery objects should have a leading $
We want to document the actual browser quirk here
Powered by Dreditor.
Comment #2
mstrelan CreditAttribution: mstrelan commentedGreat, I had never realised why variables had $ signs in this file. Re-roll attached
Comment #3
sunThanks for reporting, reviewing, and testing! Committed attached patch to all branches.
A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.
Comment #5
aristeides CreditAttribution: aristeides commentedI know this is marked as "fixed", but I'm having this issue with the latest dev version of this on D6...
actually not only on firefox abut all browsers.
On the password field when a user clicks to enter his/her password, the "password" title fades out instantly and then reappears...
Comment #6
klonosYep, been getting it too in latest 7.x-dev in firefox (haven't tested yet other browsers, but I will and then report back).
Comment #7
mstrelan CreditAttribution: mstrelan commentedThis is fixed for me in FF6, but still present in Chrome 14.
Comment #8
klonosI also confirm this is fixed in latest fx 8.0a1 x64 (it must have been something committed in the August 15th build or the one before it I guess).
Still there in IE9 (both x86 & x64) - at least on Win7 x64.
Comment #9
mstrelan CreditAttribution: mstrelan commentedThis part doesn't really make sense. Essentially it says "if the value of the field is empty, or the value is at its original state, hide the label". Wouldn't it make more sense to say "if the label is visible, hide the label".
New code
This doesn't solve the problem of one field (eg username) triggering a value in another field (eg password), and the user not focussing immediately on the field whose value was updated (eg password). This is another issue - #903140: Provide workaround for Firefox not triggering the onchange event when prefill occurs
Comment #10
kvoltz CreditAttribution: kvoltz commentedIm still seeing this in the latest 7.x version. has anyone had any luck here?
Comment #11
jamesdixon CreditAttribution: jamesdixon commentedFor those of you with this issue in Chrome, you can add a fix into compact_forms.js:
Comment #12
FiNeX CreditAttribution: FiNeX commentedThe fix suggested by @jamesdixon works fine on Chrome. Would be possible to commit the patch?
Comment #13
millionleaves CreditAttribution: millionleaves as a volunteer and commentedComing late to this discussion.
I have used Compact Forms on a number of sites with no issues. On my latest site, however, I am using another module that injects JS into the page (Backstretch). This module breaks with the latest -dev version of Compact Forms when using Chrome.
Looking at the code, it appears that this patch is included, and the Safari check in the code is what's breaking Backstretch. Commenting the following lines in compact_forms.js fixes the issue:
Reading around the subject suggests that $.browser is deprecated.
Comment #14
apadernoI am closing this issue, since it is for a Drupal version that now is not supported.
Please re-open it if the issue is also relevant for other project branches that require a supported Drupal version.