Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(form): exclude honeypot field from floating labels js #2230

Closed
mathetos opened this issue Oct 24, 2017 · 2 comments
Closed

fix(form): exclude honeypot field from floating labels js #2230

mathetos opened this issue Oct 24, 2017 · 2 comments
Assignees

Comments

@mathetos
Copy link
Member

Issue Overview

The floating labels feature adds markup to the labels and inputs on our form. While I haven't been able to replicate this perfectly, I can see that floating labels makes changes to the honeypot markup when activated. I'd strongly suggest we somehow exempt the honeypot from the floating labels JS completely just to avoid potential false flags with the honeypot.

Steps to Reproduce (for bugs)

  1. Enable floating labels on a form
  2. Check the markup, it should look something like this:
    image
  3. Disable floating labels on the same form
  4. The markup should now look something like this:
    image

It should look like the second screenshot regardless of the floating labels being enabled or not.

@mathetos
Copy link
Member Author

It's also very awkward that floating labels ends up adding a <div> inside of a <span> -- that's not appropriate markup. It's probably more advisable that the honeypot element wrapper should itself be a div instead of a span.

@tw2113
Copy link
Contributor

tw2113 commented Jan 23, 2018

Should probably add .give-honeypot to this found in assets/js/frontend/give.js:

give_float_labels = new FloatLabels( '.float-labels-enabled', {
	exclude: '#give-amount, .give-select-level, [multiple]',
	prioritize: 'placeholder',
	prefix: 'give-fl-',
	style: 'give',
} );

@DevinWalker DevinWalker changed the title Potential issue with Honeypot and Floating Labels fix(form): exclude honeypot field from floating labels js Jul 31, 2018
ravinderk added a commit that referenced this issue Aug 7, 2018
fix(form): exclude honeypot field from floating labels js #2230
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants