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

Don't wrap the overridden element with a container #21

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

stuckj
Copy link
Contributor

@stuckj stuckj commented Sep 29, 2017

The current code is wrapping the original input and the generated input
with a container span. The wrapper causes problems with inputs that
use :focus to, e.g., change the underline border color or animate moving
placeholder text via CSS. This can only be done with javascript without
having the input as a sibling except in the trivial case where there is only
one input on the page.

John Stucklen added 2 commits September 29, 2017 14:24
The wrapper causes problems with inputs that use :focus to, e.g., change
the underline border color or animate moving placeholder text via CSS
only. Without having the input as a sibling this can only be done with
javascript (unless you're only dealing with one input on the whole
page).
@mydea
Copy link
Owner

mydea commented Dec 6, 2017

I'm not quite sure what problem that solves.

Currently, you'd get a markup like:

<label>
<div wrapper>
  <input hidden>
  <input display>
</div>

What prevents you from using focus here? I am sure that there are also scenarios where this would lead to an issue:

<label>
<input hidden>
<input display>

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

Successfully merging this pull request may close these issues.

2 participants