Google +1 Button Javascript Conflict

The following is a quick heads up to any designers out there who like me may wish to protect what little hair they have left from being pulled out. It turns out the Google +1 (aka “PlusOne”) button conflicts with the Javascript onMouseMove(event). This is not my cup of tea but I know our in-house programmer has a headache from this and there is a handy thread at Google for interested parties to follow who may be facing the same issue. I know John Mueller has received notice of the issue so hopefully there will be a fix soon.

To quote “Fine Art America” who started the support thread at Google Webmaster Central, this is the issue:

{ Warning Tech Jargon commencing… now }

I use setTimeout to include plusone.js after four seconds. In the first four seconds, you can move your mouse around and the screen will show the coordinates just fine. After four seconds, the plusone.js script executes… the plusone button appears… and the mouse’s clientX and clientY parameters instantly become “undefined”.

That’s it – the plusone script killed them.

I did this with setTimeout just to illustrate the point. If you include plusone.js right from the beginning, then clientX and clientY will never work.

Plusone.js is definitely causing this.

As I understand it this won’t be an issue for a great many people but I don’t understand it very well (LOL) so I am open to your thoughts on this. Do you have an issue with the PlusOne button on your site? If so, please share it here!

Check out Stepforth for more articles by Ross Dunn

Categorized as Design

By Ross Dunn

Ross Dunn is the CEO and founder of StepForth Web Marketing Inc., an SEO firm that has been providing expert services since 1997. Ross´s considerable experience in the world of search has made him a respected writer for countless publications and an SEO consultant for small business and Fortune 500 web properties.