Why I hate browser inconsistencies…
This post is going to be somewhat out of character for me – it doesn’t include anything about food. But if I can write this up and save anyone else the frustration that I’ve been having the last couple of weeks that would be good.
Error: Object doesn’t support this property or method
What object? Which property? Couldn’t it give a little more hint than that? And it referenced a line in tiny_mce.js (in the Sizzle.filter function) that looked just fine, just standard calls. What’s going on?
The tinyMCE FAQ wasn’t exactly helpful. It’s only suggestion for IE problems was removing an extra comma in the init function, but my init function was correct. Much googling of tinyMCE, IE, and the error message didn’t turn up anything useful. Not only that, but very similar examples on the tinyMCE site work just fine in all the browsers I tried including multiple versions of IE – so it really had to be something in my configuration that was causing the problems.
Finally I was directed to this post about a jQuery/json incompatibility with Internet Explorer. Strange – my application doesn’t use JQuery – why should this apply? It turns out that tinyMCE includes Sizzle which is a part of JQuery. And that’s where this line of code is.
Changing:
if ( (match = Expr.match[ type ].exec( expr )) != null ) {
to
if ( Expr.match[ type ].exec && (match = Expr.match[ type ].exec( expr )) != null ) {
in the Sizzle part of tiny_mce.js as described in the post fixes everything.