Steps to reproduce:
- Create a sortable table (like the one in the provided url)
- Execute $('table.sortable').clone(true /* = with data and eventhandlers */).appendTo(mw.util.$content);
- Click the headers of the new table.
Expected result: The table sorts correctly.
Actual result: An error is thrown: h[list[i][0]] is undefined
Version: 1.20.x
Severity: normal
URL: https://commons.wikimedia.org/w/index.php?title=Commons:Sandbox&oldid=74898123