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

Bug fix for getRange function #13

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open

Conversation

capocasa
Copy link

The getNode method of the Range object iterates over the range ancestor's child nodes with $.each. The $.each callback function checks if the currently iterating child is in range, and assigns it to a variable child if it is.

There is a variable child declared in the callback function's parent scope, but it never gets assigned anything by because the callback function argument is also called child.

The callback function now assigns to a variable called node, so now getRange works as intended.

Additionally, iteration is now stopped after finding a matching node.

@capocasa
Copy link
Author

Updated the commit range to include a fix for issue 10 (#10).

@capocasa
Copy link
Author

IE fix caused a problem with non-IE, now fixed

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