JonBlog
Thoughts on website ideas, PHP and other tech topics, plus going car-free
Unexpected Opera/Win behaviour with MooTools 1.2
Categories: Technical

A little while back, I was developing a user interface that made use of a table containing form elements – and I ran into a very unusual browser problem. My JS code contained an <tr> HTML insertion using MooTools’ element.set() on a tbody element, and I received a customer report that the interface wasn’t working correctly in Opera on Windows. After much bug-hunting, it transpired that on this platform the insert will work, but attributes are stripped from the outermost tag. So, in the following code, the row id would be stripped, but not the cell or paragraph classes:

<tr id="row_1"><td class="col1"><p class="highlight">...</p></td></tr>

My project makes use of MooTools 1.2.4, and the issue is still exhibited in the current release of this branch, 1.2.5. The latest 1.3 branch however does is not affected. I’ve written a demonstration page to test this issue, using MooTools itself, and will raise a bug report.

Update: issue confirmed by MT community members on IRC, so I’ve raised a bug.

Update 16 July: meh, they’re not fixing. This post stays up, however, as search engine bait. My work projects are stuck on 1.2.x for the foreseeable AFAIK, and I could have used this info at the time! Trust it is of use to someone else.

Leave a Reply