Strange Firefox-only bug

Strange Firefox-only bug

ericDeckerericDecker Posts: 15Questions: 0Answers: 0
edited September 2013 in General
Hello,

I'm experiencing a minor bug on some of my Datatables in Firefox only. It's hard to describe and I cannot provide a link, so I'm including an image that illustrates the issue. But, basically, one th of the thead in .dataTables_scrollBody is somehow peeking out from behind the one in .dataTables_scrollHead. There's an extra pixel of gray below the actual header (across the whole width) and a small black line about the width of the sorting image. I can hide it with CSS, but I would rather address the problem in a more appropriate way.

http://imageshack.us/photo/my-images/594/471l.png/

http://debug.datatables.net/adarop (#all_files_list)

Replies

  • ericDeckerericDecker Posts: 15Questions: 0Answers: 0
    Well, I figured out it was the fact that I was applying a relative position to all cells in those columns. As soon as I restricted this style rule to apply to those cells within the tbody it was resolved.

    Not sure if this is something you'd care to change in the core, like having position: static !important on the tbody th's?
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    I don't think the DataTables CSS should attempt to correct for all possible misconfigurations in external CSS. That would be amazingly complex, hard to maintain, difficult to debug and a nightmare to customise. The DataTables core CSS should be as simple as possible. I've taken steps in that direction with the completely rewritten CSS for 1.10 :-)

    Allan
  • ArtjomArtjom Posts: 48Questions: 0Answers: 0
    edited September 2013
    Sounds similar to the problem I have encountered myself. Here are additional details:

    http://datatables.net/forums/discussion/16171/fixedcolumns-nightly-visual-discrepancy-in-firefox-for-multi-row-headers/p1

    I my case it was more or less fixed by hiding protruding elements.
  • ericDeckerericDecker Posts: 15Questions: 0Answers: 0
    Hi Allan,

    I'm not sure how adding one style rule qualifies as "amazingly complex, hard to maintain and difficult to debug." What is the practical use-case for wanting to have position:relative on a table header? Misconfiguration or not, I'm not sure why anyone would ever want to customize this, and if they did, why it wouldn't be possible under my proposed solution... but that's okay, I'm looking forward to seeing the CSS in 1.10. :)
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    A single style rule sure no problem! But my point was that is that style is added then every possible style would need to be added - there is no difference between that and and override on the display, for example. As I said, I'm not willing to try and stop all possible misconfigurations, and once I start with one, I wouldn't stop :-).

    > What is the practical use-case for wanting to have position:relative on a table header?

    None I'd say! That was a misconfiguration. My point is that there are millions of possible misconfigurations and this is just one. Just like DataTables assumes valid HTML is used, it assumes sensible CSS :-)

    Allan
  • ericDeckerericDecker Posts: 15Questions: 0Answers: 0
    Alright, well it's also kind of annoying that these phantom headers also add additional tabindexes to the page, any advice for that? I'm not entirely sure what the purpose of having an extra header at all, is it not possible for it to be removed once it serves its purpose?
This discussion has been closed.