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 for handleinputs and handletextareas being null #57

Merged
merged 1 commit into from
Nov 29, 2013

Conversation

cwoolum
Copy link
Contributor

@cwoolum cwoolum commented Nov 26, 2013

In IE, if handleInputs or handleTextAreas is undefined, a undefined error was being thrown on length. This checks that the item has a value before trying to use it

@@ -146,9 +146,12 @@
handleInputs = node ? node.getElementsByTagName("input") : inputs;
handleTextareas = node ? node.getElementsByTagName("textarea") : textareas;

var handleInputsLength = handleInputs ? handleInputs.length : 0;
Copy link
Owner

Choose a reason for hiding this comment

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

Please follow the existing code conventions. Can you move the declarations up to the top of the function?

@jamesallardice
Copy link
Owner

Thanks for this. I've added a couple of minor comments to the diff. If you can fix those then I'll merge this in for the next release.

@jhecking
Copy link

Noticing this issue as well when running our feature specs using PhantomJS. Will this fix be included in v3.0.2?

jamesallardice pushed a commit that referenced this pull request Nov 29, 2013
Fix for  handleinputs and handletextareas being null
@jamesallardice jamesallardice merged commit 087bdfb into jamesallardice:master Nov 29, 2013
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.

3 participants