Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

input type='number' value is not cleared on property reset #623

Closed
philmueller opened this issue Oct 25, 2011 · 8 comments
Closed

input type='number' value is not cleared on property reset #623

philmueller opened this issue Oct 25, 2011 · 8 comments

Comments

@philmueller
Copy link

Hi,

please take a look at http://jsfiddle.net/pktYz/
Press the CLICK ME button

  • expected: second input field to be empty
  • result: second input field still contains the old value

Tested with AngularJS v0.10.4, Firefox 7, Chrome 15, IE 8

@mhevery
Copy link
Contributor

mhevery commented Oct 25, 2011

Actually, that works as intended. :-( The issue is that html5 browsers do
not let you set the input to blank if you specify number. So short of
changing the input type to text, there is no way to clear the content.

-- Misko

2011/10/25 Philipp Müller <
reply@reply.github.com>

Hi,

please take a look at http://jsfiddle.net/pktYz/
Press the CLICK ME button

  • expected: second input field to be empty
  • result: second input field still contains the old value

Tested with AngularJS v0.10.4, Firefox 7, Chrome 15, IE 8

Reply to this email directly or view it on GitHub:
#623

@IgorMinar
Copy link
Contributor

That's not true. You can set input@type=number to blank either via UI or programmatically. Unless I'm missing something, this bug is valid.

@mhevery
Copy link
Contributor

mhevery commented Oct 26, 2011

You are right, so why does it not work then. ok, valid bug.

2011/10/26 Igor Minar <
reply@reply.github.com>

That's not true. You can set input@type=number to blank either via UI or
programmatically. Unless I'm missing something, this bug is valid.

Reply to this email directly or view it on GitHub:
#623 (comment)

@philmueller
Copy link
Author

The case for 'undefined' value is missing in numericRegexpInputType(). I created a patch that works for me: https://gist.github.com/1320239

edit: sorry, didn't mean to close the issue...

@philmueller
Copy link
Author

The bug still exists in v0.10.5. Could you please have a look at my patch?

@mhevery
Copy link
Contributor

mhevery commented Nov 15, 2011

Sorry we dropped the ball, and thanks for reminding us. Here is the fix
which should make it to the next release:
#656

BTW, may we request that you send us a pull request with tests next time.
That would make the process much faster.

-- Misko

2011/11/15 Philipp Müller <
reply@reply.github.com

The bug still exists in v0.10.5. Could you please have a look at my patch?


Reply to this email directly or view it on GitHub:
#623 (comment)

@philmueller
Copy link
Author

Thanks! I'll try to send a pull request + tests the next time...

@pkozlowski-opensource
Copy link
Member

Seems like #656 (or some other commit) fixed it since it works fine now:
#656

Closing.

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

No branches or pull requests

4 participants