Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jsfiddle works in FireFox, Chrome but not IE8

Here is my JSFiddle. It works fine in Chrome and FireFox, but I get this error when running it in IE8:

Message: Object doesn't support this property or method
Line: 244
Char: 9
Code: 0
URI: http://jsfiddle.net/js/Actions.js

I added the code from this JSFiddle to my site and I'm seeing the same issue with IE8. Do I have to add something specific to get it working in IE8?

Thanks

like image 268
Mark B Avatar asked Oct 12 '11 18:10

Mark B


2 Answers

One of jsFiddle's scripts contains an error. It is expecting the element to have already been extended by MooTools, but it's not. If I knew how, I'd tell the jsFiddle devs that they need to wrap e.target in a call to $():

Line 244 of http://jsfiddle.net/js/Actions.js:

if (e && $(e.target).getParent().get('id') == 'm') {

Edit: As a work around, add this bookmarklet to your links bar and click it once when the page loads. It will get the run button in a state where the error won't occur anymore.

javascript: $$("#run > span"); void 0;

Another work around is to use ctrl+enter instead of clicking the "run" button.

While we're on the topic of making jsFiddle behave with IE through bookmarklets, here's one I use to get the jsFiddle toolbar back in view after it goes all wonky when I paste something into the script editor pane:

javascript: document.body.scrollIntoView(); void 0;

There's no reason you couldn't combine those into one - neither would have any ill effect on the other:

javascript: document.body.scrollIntoView(); $$("#run > span"); void 0;
like image 106
gilly3 Avatar answered Nov 09 '22 14:11

gilly3


It's not your script. I just ran JSFiddle completely empty with jQuery version you had selected and all the different load settings.

You get the error every time, even if you have no javascript in your window at all.

like image 3
Joseph Avatar answered Nov 09 '22 15:11

Joseph