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

Fix issue #17 - IE11 page hangs on empty input triggering #32

Merged
merged 1 commit into from
Jan 19, 2018

Conversation

joe-campiondigital-mo
Copy link

This fixes #17

IE11 set focus to an empty field if focus was lost. When focus was moved to another empty field this would cause a loop and melt the browser. There are no negatives fixing it like this as far as I can see as we don't want to format "" values anyway.

@joe-campiondigital-mo
Copy link
Author

Hmm.. this doesn't fix the minified jQuery build. It works for the un-minified version.

I might have to re-visit this.

@joe-campiondigital-mo
Copy link
Author

I had to tweak the build script to use uglifyjs rather than uglify as it was changing this logic. === was being converted to !== on minification. Very strange!

@@ -310,6 +314,8 @@
# Format CVC

reFormatCVC = (e) ->
if e.target.value is ""
return
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These could be shortened to be return if e.target.value is ""

@hppycoder
Copy link

This feels like a really important change to have added, could we get this PR merged? We still have users on IE11 sadly.

@jondavidjohn
Copy link
Owner

@hppycoder Have you verified this does in fact fix the issue for IE11?

@hppycoder
Copy link

I will verify Tuesday. We are looking at changing our code out and our qa will be happy to look.

@hppycoder
Copy link

hppycoder commented Jan 19, 2018

I am sorry it's taken me so long to test this. I am confirm that this code change will 100% fix the IE11 issue. I tested this by having a virtualbox with IE11 and Windows10 on it. I ensured that the current working example of: https://jondavidjohn.github.io/payform/ failed.

Not only did it lock the browser up but it did it with style! It moved the cursor between fields over and over and finally crashed the browser.

I then brought the example into a plnkr. I used the origional "payform.min.js" from the site and tested my plnkr. Found that it had the same affect as the current site to verify my plnkr was setup correctly. Then took the modified "payform.min.js" from the PR and tried again. It's working smoothly and does not crash the browser.

@jondavidjohn - Please merge this and create a release, I would like to bring into my current project as soon as possible.

@jondavidjohn jondavidjohn merged commit 40ee56a into jondavidjohn:develop Jan 19, 2018
@jondavidjohn
Copy link
Owner

Thanks for testing @hppycoder !

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

Successfully merging this pull request may close these issues.

4 participants