-
Notifications
You must be signed in to change notification settings - Fork 81
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
Fix issue #17 - IE11 page hangs on empty input triggering #32
Conversation
Hmm.. this doesn't fix the minified jQuery build. It works for the un-minified version. I might have to re-visit this. |
I had to tweak the build script to use uglifyjs rather than uglify as it was changing this logic. |
fcfc395
to
1d007ff
Compare
src/payform.coffee
Outdated
@@ -310,6 +314,8 @@ | |||
# Format CVC | |||
|
|||
reFormatCVC = (e) -> | |||
if e.target.value is "" | |||
return |
There was a problem hiding this comment.
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 ""
2a9400b
to
20cd2b9
Compare
20cd2b9
to
882e606
Compare
This feels like a really important change to have added, could we get this PR merged? We still have users on IE11 sadly. |
@hppycoder Have you verified this does in fact fix the issue for IE11? |
I will verify Tuesday. We are looking at changing our code out and our qa will be happy to look. |
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. |
Thanks for testing @hppycoder ! |
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.