Follow and Share buttons stopped working in IE & FF



Howdy! We used the button generator code to create follow and share buttons within some modal dialogs. With no change to the code on our end, the buttons are now hidden in IE. For the follow button, it appears the iframe is generated with the style attribute containing “visibility: hidden”. The share button has that as well but also has a width of 0 on the button div element within the iframe content. This is happening only in IE and only in the last couple days.

Sample code:

<a href="" class="twitter-follow-button" data-show-count="false" data-size="large" data-dnt="true">Follow @1065wyrk</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);;js.src=p+'://';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>

My initial thought is that the modal being hidden when the button is added is a factor but since this works in all other browsers and has only started having problems in IE recently, I am not entirely sure. Tested in IE 11. Any ideas?

UPDATE: Firefix is also affected


Does your webpage include a rendering engine directive for Internet Explorer such as X-UA-Compatible?

I was unable to repeat your issue from an isolated JSFiddle.


We are not currently using any rendering engine directives, no. That said, I’ve discovered that FF is affected as well. I’ve managed to reproduce the issue in JSFiddle:

When you open the modal window, the twitter buttons show up in chrome but not on IE or FF.


For the time being, we have implemented this workaround:

The modal is initially loaded off screen rather than hidden with “display: none”. The dynamic content from the button script seems to load with the correct parameters/styles in this scenario. Any clue as to why the difference?


Hi! I was struggling with the same problem.

I’m now considering your workaround but I was wondering if you got any feedback on this.


I never got a response. The workaround is still functioning.


Thanks for the workaround, it works great.
But is there any chance to be an official way to do it ? :smile: