Skip to content

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

Open
stuckj wants to merge 2 commits into
mydea:masterfrom
FitnessKeeper:no-input-wrap
Open

Don't wrap the overridden element with a container#21
stuckj wants to merge 2 commits into
mydea:masterfrom
FitnessKeeper:no-input-wrap

Conversation

@stuckj

@stuckj stuckj commented Sep 29, 2017

Copy link
Copy Markdown
Contributor

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

mydea commented Dec 6, 2017

Copy link
Copy Markdown
Owner

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