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

Doesn't work in IE8 #87

Closed
jdpopkin opened this issue Sep 23, 2014 · 4 comments
Closed

Doesn't work in IE8 #87

jdpopkin opened this issue Sep 23, 2014 · 4 comments

Comments

@jdpopkin
Copy link
Contributor

I think mailcheck crashes in IE8 because of a single call to String.trim. I know IE8 is annoying, but we're so close!

I have a long bus ride coming up this weekend, so I'll probably take a shot at it.

@weilu
Copy link
Contributor

weilu commented Sep 24, 2014

How about adding a shim to add String.trim support to IE8 at the application level rather than trying to handle it at the library level?

@vitalvital
Copy link

Since it is a jQuery plugin - $.trim() should be used.

@weilu
Copy link
Contributor

weilu commented Oct 9, 2014

This library can be used as a jQuery plugin; it can also be used without jQuery. It's unfortunate that some devs still have to support IE8. If one has to do it, like I recommended above, the issue can be solved by pulling in a shim. Given how long ES5 has been around, it's just not a concern at the library level to support legacy browsers.

@weilu weilu closed this as completed Oct 9, 2014
@jdpopkin
Copy link
Contributor Author

jdpopkin commented Oct 9, 2014

Full compliance with IE8 would require that we replace var parts = email.trim().split('@'); with var parts = email.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "").split('@'); as per Mozilla's shim for trim. I suppose it makes sense to handle this at an application level (as a lot of other JavaScript libraries seem to do).

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

No branches or pull requests

3 participants