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

catching blank tables, rows and cells #21

Open
wolispace opened this issue Aug 17, 2017 · 0 comments
Open

catching blank tables, rows and cells #21

wolispace opened this issue Aug 17, 2017 · 0 comments

Comments

@wolispace
Copy link

wolispace commented Aug 17, 2017

I have made a few hacks to my old v2 sortable.js and just found this v2e3 (thanks for the great work).

The hacks needed to re-do are:

line 85:

guessType: function(table, column, sortle) {
		
  // ADD WM 2014-07-28 - if there are no rows in the tbody then return..
  if (!table.tBodies[0]) {
    return;
  }

line 164:

getInnerText: function(node) {
...  
  // wm 20170520 - ignore Comment nodes - we can tell them as they have a nodeType==8..
  if (!node || node.nodeType == 8) {
   return '';
  }

I can't remember why I needed to ignore nodeType==8 but checking for no node was rather important (I think with rows with no where expected, colspan=2 etc..)

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

No branches or pull requests

1 participant