We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The way Svelte creates inputs that are not supported in IE throws an 'Invalid argument' error.
Example: https://svelte.technology/repl?version=1.56.2&gist=fa8724f2cbebbcf391e3184b0bc5c39c
I have a hard time finding some good docs on this, but here are some similar issues: emberjs/ember.js#10458 angular/angular#16575
I have seen this in IE11 but have not checked other versions of IE.
What I have found is that the method Svelte uses to set the type throws an error:
input.type = 'date';
But, if you use the setAttribute, that seems to work. For instance, my workaround is this:
setAttribute
oncreate: function() { if (this.get('isIE')) { this.refs.dateInput.setAttribute('type', 'date'); } }
Note that though IE doesn't support the date type, there are polyfills/shims that will work around it, hence the need to have the attribute correct.
I am not sure the repercussions of switching to setAttribute, but I am not necessarily convinced that this is a problem Svelte needs to solve.
The text was updated successfully, but these errors were encountered:
4e99eb8
Merge pull request #1237 from sveltejs/gh-1209
2623946
use setAttribute with inputs, for benefit of IE - fixes #1209
Successfully merging a pull request may close this issue.
The way Svelte creates inputs that are not supported in IE throws an 'Invalid argument' error.
Example:
https://svelte.technology/repl?version=1.56.2&gist=fa8724f2cbebbcf391e3184b0bc5c39c
I have a hard time finding some good docs on this, but here are some similar issues:
emberjs/ember.js#10458
angular/angular#16575
I have seen this in IE11 but have not checked other versions of IE.
What I have found is that the method Svelte uses to set the type throws an error:
But, if you use the
setAttribute
, that seems to work. For instance, my workaround is this:Note that though IE doesn't support the date type, there are polyfills/shims that will work around it, hence the need to have the attribute correct.
I am not sure the repercussions of switching to
setAttribute
, but I am not necessarily convinced that this is a problem Svelte needs to solve.The text was updated successfully, but these errors were encountered: