agorapulse / grails-facebook-sdk

Facebook SDK Grails Plugin
http://agorapulse.github.com/grails-facebook-sdk/guide
30 stars 13 forks source link

Multiple javascript executions when including a tag multiple times #65

Closed moritzp closed 10 years ago

moritzp commented 10 years ago

If including the a js dependent view more than once, the javascript is also included more than once, which leads to multiple executions of the script and therefore multiple popups etc.

benorama commented 10 years ago

Indeed, since 0.6.0, this is an issue. We might put some variables in the request scope to prevent multiple inserts... I'm going to have a look on this.

moritzp commented 10 years ago

I already committed something you might want to check it out: https://github.com/moritzp/grails-facebook-sdk/commit/153373c17b4b2a107de0d0bc742ff451167114c7

benorama commented 10 years ago

Hi Moritz,

I've updated the tag lib to automatically record included scripts so that there are only include once. I just released 0.6.1. Let me know if it solves your issue.

Thanks for the bug report!

moritzp commented 10 years ago

Indeed, yours is a nicer solution :) Works for us! Thanks for the quick fix!!