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

IE11 fires "input" event on textarea if a placeholder is set #7138

Closed
oberhamsi opened this issue Nov 27, 2017 · 4 comments
Closed

IE11 fires "input" event on textarea if a placeholder is set #7138

oberhamsi opened this issue Nov 27, 2017 · 4 comments

Comments

@oberhamsi
Copy link

Version

2.5.8

Reproduction link

https://jsfiddle.net/50wL7mdz/79205/

Steps to reproduce

Opening the page in IE11 will display the message "Foo is no longer null".

In modern FF, Chrome and Edge the message does not show up and foo remains null until the user actually inputs something.

IE11 does not fire an input event if no placeholder is set as show with the second textarea.

What is expected?

No input event should fire and thus foo should remain null

What is actually happening?

IE fires an input event if the textarea has a placeholder


There was a similar issue in angular angular/angular.js#2614

@posva
Copy link
Member

posva commented Nov 27, 2017

Unfortunately, this is an IE bug (https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/101220/). IE shouldn't fire an input event

I thought we already closed an issue with this but I couldn't find it, must be my imagination 😄

@oberhamsi
Copy link
Author

Found this on the old bug tracker and last comment from MS: no fix

https://connect.microsoft.com/IE/feedback/details/856700/ie11-ie10-send-input-events-at-times-when-it-is-not-appropriate

@yyx990803
Copy link
Member

yyx990803 commented Nov 27, 2017

Note: I assume you want to preserve the null state to determine whether an input field is dirty or not. The patch above only fixes the initial rendering - subsequent change to placeholder (if a dynamic binding is used) will still trigger input events in IE, and it happens to <input> tags as well. That we consider a wontfix as it involves significantly more complex workarounds for marginal benefits.

@oberhamsi
Copy link
Author

thanks!

lovelope pushed a commit to lovelope/vue that referenced this issue Feb 1, 2018
f2009 pushed a commit to f2009/vue that referenced this issue Jan 25, 2019
yyx990803 pushed a commit that referenced this issue Feb 4, 2019
- the original bug in #7138 only happens for `<textarea>`
- the bug doesn't happen if placeholder has empty value

fix #9042, fix #9383
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

3 participants