-
Notifications
You must be signed in to change notification settings - Fork 235
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
HtmlTable.selectNone fails with empty table #1081
Comments
I dug into this a bit more, and it appears that there are already tests in the Specs directory which tickle this problem. Without my change:
Whereas with my change, this test passes. (I ran this test by simply opening up .../mootools-more/Tests/Specs/Runner/runner.html?preset=more-all&spec=HtmlTable.Select%20should%20select%20all%20and%20select%20none. in my browser) In fact, running Tests/Specs/Runner/runner.html without my change gives me
and with my change:
|
I've updated my pull request to fix the bug you pointed out. I believe it is better to fix the selectNone() method than to hack around it in the empty() method. |
HtmlTable.selectNone is failing when my table is empty. This appears to be due to the fact that HtmlTable.selectRange doesn't do very good bounds checking. It bounds properly bounds endRow, but doesn't deal with startRow < 0. Here's the relevant section of code:
Here's my suggested fix:
The text was updated successfully, but these errors were encountered: