Search code examples
javascriptfacebookfacebook-likefacebook-iframe

Facebook like button iframe implementation not clickable in Firefox, works in other browsers


I'm using the plain iframe codes, NOT xfbml (was getting fragments appended so reverted to basic iframe).

<iframe scrolling="no" frameborder="0" style="border: medium none; overflow: hidden; width: 92px; height: 22px; position:absolute;top:3px;left:180px;" allowtransparency="true" src="http://www.facebook.com/plugins/like.php?href=http://www.xxxxwebsitexxxx.co.uk&amp;layout=button_count&amp;show_faces=false&amp;width=92&amp;action=like&amp;font=arial&amp;colorscheme=light"></iframe>

The button displays correctly but upon clicking it in firefox, i get the following error:

this.event is undefined
http://static.ak.fbcdn.net/rsrc.php/v1/yW/r/MrPDat_Xp7Z.js (line 31)

I think the offending line is this:

__d("DOMEvent",["copyProperties"],function(a,b,c,d,e,f){var g=b("copyProperties");function h(i){this.event=i||window.event;this.target=this.event.target||this.event.srcElement;}g(h.prototype,{preventDefault:function(){var i=this.event;i.preventDefault?i.preventDefault():i.returnValue=false;return this;},stopPropagation:function(){var i=this.event;i.stopPropagation?i.stopPropagation():i.cancelBubble=true;return this;},kill:function(){this.stopPropagation().preventDefault();return this;}});e.exports=h;});

__d("DOMEventListener",[],function(a,b,c,d,e,f){var g,h;if(window.addEventListener){g=function(j,k,l){j.addEventListener(k,l,false);};h=function(j,k,l){j.removeEventListener(k,l,false);};}else if(window.attachEvent){g=function(j,k,l){j.attachEvent('on'+k,l);};h=function(j,k,l){j.detachEvent('on'+k,l);};}var i={add:function(j,k,l){g(j,k,l);return {remove:function(){h(j,k,l);j=null;}};},remove:h};e.exports=i;});

Is this a known issue, i've tried the same code in a plain website as well as disabling all add-ons to make sure it's not compatability problems.

I'm using firefox 12.0 on a mac.


Solution

  • As of May 3rd 2012, 22:14 (GMT+1) it appears this problems has been fixed by Facebook.

    I checked the javascript the iframe implementation pulls in and the offending line of code has been changed.

    When I now click on the facebook like button, the popup displays as it should.