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

Typing 'e' writes on top of label #377

Closed
samuelli opened this issue Apr 11, 2016 · 3 comments
Closed

Typing 'e' writes on top of label #377

samuelli opened this issue Apr 11, 2016 · 3 comments

Comments

@samuelli
Copy link
Contributor

Description

'eee' writes on top of the label
result

Expected outcome

Label floats

Actual outcome

Label stays

Live Demo

http://jsbin.com/kasivaxuni/edit?html,output

Steps to reproduce

  1. Type 'eee' into the paper-input type='number' field
@notwaldorf
Copy link
Contributor

notwaldorf commented Apr 15, 2016

We seem to get no input event fired (from the native input) when the first e is typed :(

Update: Ohhhh I see. Because the default value of the iron-input is "", when you type an e the value still stays as the empty string (since input type=number is evil like that). In this line, bindValue and value are the same, so no event is fired, which is why nobody is notifying the paper-input to float the label.

@notwaldorf
Copy link
Contributor

@samuelli I'm tempted to close this since I don't really see how we can fix it; <input type=number> does everything in its power to not save the invalid value anywhere, so without doing enormous hacks (saving the entered text after iron-input's _onKeypress and checking it in _onInput, and hope for the best these are always in the same order) I don't see a solution.
WDYT?

@samuelli
Copy link
Contributor Author

Yeah, that's probably fair!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants