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

Use calculated index instead of DOM index #1424

Merged
merged 2 commits into from
Jul 2, 2017
Merged

Conversation

ced-b
Copy link
Contributor

@ced-b ced-b commented Jul 2, 2017

There seems to be a scenario when there are multiple thead entries in a table where some versions of Firefox (around 47) return -1 for cell.parentNode.rowIndex, which winds up with the whole top part being laid out wrongly.

However, I looked this over and did not see any reason why not to use the calculated i for the row index instead.

ced-b added 2 commits July 2, 2017 16:14
There seems to be a scenario when there are multiple `thead` entries in a table where some versions of Firefox (around 47) return -1 for `cell.parentNode.rowIndex`, which winds up with the whole top part being laid out wrongly.

However, I looked this over and did not see any reason why not to use the calculated `i` for the row index instead.
@Mottie
Copy link
Owner

Mottie commented Jul 2, 2017

Hi @ced-b!

That is odd that it would make a row index of -1. According to spec:

As a child of a table element, after any caption, and colgroup elements and before any tbody, tfoot, and tr elements, but only if there are no other thead elements that are children of the table element.

Meaning a <table> is only allowed one child <thead> (ref)

That being said, I don't see any issue with this change.

Thanks!

@Mottie Mottie merged commit c3fdce9 into Mottie:master Jul 2, 2017
@ced-b
Copy link
Contributor Author

ced-b commented Jul 3, 2017

@Mottie Thanks. I guess I abused the thead a bit then. But I hope this update still makes your plug-in more stable.

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.

2 participants