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

select.val(newValue) doesn't work in IE10 if option contents have leading/trailing spaces #1902

Closed
mgol opened this issue Dec 4, 2014 · 2 comments

Comments

@mgol
Copy link
Member

@mgol mgol commented Dec 4, 2014

Example:

jQuery( "<select><option> 2</option></select>" ).val( "2" ).val()

should return "2" and it doesn't in IE10.

@mgol
Copy link
Member Author

@mgol mgol commented Dec 4, 2014

This is caused by the fact that the select set valHook is reading option.value without going through the option get valHook.

mgol added a commit to mgol/jquery that referenced this issue Dec 4, 2014
The hook is still defined; not using it could cause issues in IE<11.
Also, IE10 no longer throws when value not set but it still doesn't trim the
value. IE11 has all those issues fixed; support comments are updated.

Fixes jquerygh-1902
Closes jquerygh-1901
@mgol
Copy link
Member Author

@mgol mgol commented Dec 4, 2014

PR: #1901

mgol added a commit to mgol/jquery that referenced this issue Dec 8, 2014
The hook is still defined; not using it could cause issues in IE<11.
Also, IE10 no longer throws when value not set but it still doesn't trim the
value. IE11 has all those issues fixed; support comments are updated.

Fixes jquerygh-1902
Closes jquerygh-1901
@mgol mgol closed this in #1901 Dec 8, 2014
mgol added a commit that referenced this issue Dec 8, 2014
The hook is still defined; not using it could cause issues in IE<11.
Backport the test from the master branch.

Also, IE10 no longer throws when value not set but it still doesn't trim the
value. IE11 has all those issues fixed; support comments are updated.

(cherry-picked from f6302b0)

Fixes gh-1902
Closes gh-1901
@mgol mgol added this to the 3.0.0 milestone Oct 17, 2015
mgol added a commit that referenced this issue Nov 10, 2015
The hook is still defined; not using it could cause issues in IE<11.
Also, IE10 no longer throws when value not set but it still doesn't trim the
value. IE11 has all those issues fixed; support comments are updated.

Fixes gh-1902
Closes gh-1901
@dmethvin dmethvin added this to the 1.12/2.2 milestone Jan 7, 2016
@dmethvin dmethvin removed this from the 3.0.0 milestone Jan 7, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants