This project is archived and is in readonly mode.

#519 open
gmiller

Display bug in HtmlTable.Sort with google chrome.

Reported by gmiller | February 22nd, 2011 @ 07:43 PM | in 1.4.0.1 (closed)

Take a look at this example:

http://jsfiddle.net/JYP5T/5/

Scroll the table to the bottom, so that the top of the table is scrolled off the screen. Then click "Sort!". On Firefox, the scroll position of the window is not changed (arguably the correct behavior). On Chrome, the table scrolls back to the top.

Comments and changes to this ticket

  • gmiller

    gmiller February 23rd, 2011 @ 07:07 PM

    The approach of disposing of all the children of tbody, then replacing them one-by-one appears to cause Chrome to flick back to the top of the table. Instead, if a new tbody is created, and then swapped in with replaceChild(), this does not happen. Here is a patch against 1.3 to make this change.

    http://pastie.org/private/eilmoqztkepgzfnaqgkaa

    Unfortunately, it looks like this code has been refactored since then, but the approach remains the same. It should be possible, with a bit of hand-munging, to apply this patch to the refactored code...

  • JacobThornton

    JacobThornton February 23rd, 2011 @ 07:49 PM

    • State changed from “new” to “open”
    • Milestone set to 1.3.1.1
    • Assigned user set to “JacobThornton”
    • Milestone order changed from “197566” to “0”

    yeah, i never liked that. I'll take a look at this, thanks for reporting!

  • Arian

    Arian February 25th, 2011 @ 08:15 PM

    • Milestone changed from 1.3.1.1 to 1.4.0.1
    • Milestone order changed from “51” to “0”

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

Attachments

Pages