Firefox 10, BibTemplate, and the catalogue – heads up

We discovered today that Firefox 10 (coming to desktops near you over the past few days) reacts strongly to some things that it always used to accept without complaint – which can end up in a degraded or completely broken catalogue, depending on how you’ve customized it with BibTemplate.

Long story short, we’ve been able to figure out that Firefox 10 is reacting to particular CSS3 selector syntax combinations. A solid clue is if you check the JavaScript error console, you might see a warning like:

Warning: An unbalanced tree was written using document.write() causing data from the network to be reparsed.

The warning also links to Optimizing your pages for speculative parsing from the Mozilla project, which sort of helps; at least it is clear that the Firefox project is trading fault-tolerance for speed. One thing that is known to make it angry is attribute values without quotes; for example:

query='datafield[tag=245]' /* breaks in Firefox 10 */

query='datafield[tag="245"]' /* works in Firefox 10 */

We have also determined that CSS3 selector syntax that uses hierarchies is also broken, at least in some cases. For example:

This isn’t perfect, by any means, but it should get you on the road to getting Firefox 10 working better than it might be right now. If you want to see what we’re doing at Conifer, you can follow along with our skins branch. (I’m trying not to put too much profanity in the commit messages).

Many thanks to Dan Wells for figuring out the CSS3 selector quoting; this Firefox 10 incompatibility absolutely blindsided us all and it’s always nice to have a calm voice of reason sorting things out 🙂