Issues with third party software

razum2um edited this page Dec 29, 2011 · 6 revisions

PIECSS3 and client_side_validations - How to ward off unexpected objects

Don't use, use PIE.js

A simple fact of the world. Pie is good. Some pies are even useful. like the CSS3 PIE: In a very unobtrusive way it manages to bring much of the icing of css3 to internet explorer. Drop shadows, rounded corners etc. etc.

It can be used to good effect in context with the client_side_validations gem. However…

When you put the two together something breaks. No useful error messages, no nothing. Just an 'Unexpected object' message and a discontented wail from the maladjusted Explorers (6,7 and 8 in IETester). It seems PIE is the possible culprit.

One might speculate it has something to do with execution order. Since it is jQuery that fails, it might have something to do with the fact that rails.validations.js does a bunch of .live binds. Maybe they collide with the dom rewriting that executes? As said, yours truly has no clue, but thought it prudent to make you aware of it.

What to do?

PIE's author recommends using PIE in its behavior form by referencing the file in one's stylesheets. Luckily, he also does provides a .js alternative.

Switching from using to PIE.js fixes the issue.

One of the items on the list of advantages to using PIE.js is that it is "...more easily integrated within JavaScript libraries.". I can attest to that, since I went from a broken to a working app. It is still unclear how or why, though. Maybe Jason Johnston, the author of PIE, would care to comment?

Success stories, though

Vlad Bokov aka razum2um:

i'm actually using 1.0beta5. there are some problems within IETester, but it runs normally on native IE's 7-9