This project is archived and is in readonly mode.

#185 ✓invalid
Milos Dakic

HtmlTable empty method bug

Reported by Milos Dakic | November 16th, 2009 @ 04:31 AM | in

I'm not 100% sure if this is a bug, but if anyone can confirm it would be nice.

  • create new empty table
  • set table headers
  • inject table into element
  • push data to table
  • empty table
  • push no longer works

So basically if I fill the table with data, and then try to remove all the data to refill the table, I can't do it anymore because it seems to delete the tbody tag from the table after using the empty method on the table object.

Comments and changes to this ticket

  • Milos Dakic

    Milos Dakic November 16th, 2009 @ 04:37 AM

    I can confirm that if I place the table build method after the empty method, everything works as expected.

    // create blank table with no options
    var table = new HtmlTable();
    // set some headers
    // inject table into myElement
    // push data to the table
    // this is the trouble spot, it removes the tbody tag from the table
    // at this stage if you call, the below push will work
    // if you try to push rows into the table now it wont work as the tbody tag is missing
  • Aaron Newton

    Aaron Newton November 19th, 2009 @ 07:11 PM

    • State changed from “new” to “invalid”
    • Milestone set to

    I cannot verify this. Your second post - the code where you illustrate it - works fine in It sounds like you are saying that you agree with me, but I'm not sure.

  • Milos Dakic

    Milos Dakic November 19th, 2009 @ 10:33 PM

    I've tried that code many times over but I get the same result. I'll do some further testing this weekend and get back to you.

  • Aaron Newton

    Aaron Newton November 20th, 2009 @ 12:46 AM

    If you know how, you can check out the current master of mootools -more and update it's submodules, drop the whole thing in a directory served by a web server and hit /Tests/ to see the user tests where I duplicate the code you have above.

  • Milos Dakic

    Milos Dakic November 20th, 2009 @ 12:57 AM

    Yep, will do on the weekend.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

The MooTools Extensions

People watching this ticket