GoogleWebComponents/google-signin

Fires google-signed-out event when the element is initialized

Closed this issue · 5 comments

I use the google-signin twice in my app. On the login page to allow users to connect and in the app header to allow them to log out. When a user just logged in, the second button is displayed (attached to the DOM in fact) and it fires the google-signed-out event.

I did a workaround to fix this quickly on my side but it does not work on Firefox because I have used the event.target and it's not defined on Firefox (the event is a little bit different from Chrome).

Firefox 44.0.2 on OSX EC 10.11.4 (logged in with only one Google account)

EDIT:
I found out it simply a weakness at the initialization. When the element is created the signedIn property changes from undefined to false. So, in this case we don't have to send google-signed-out event. I sent a PR for this ! 😉

I do not have the bandwidth to understand exactly what's going on, but I think this should be looked at.

This article explains the issue I encountered and why I check the oldVal in the proposed pull request.

yeah, I'm finding this pretty annoying.

Is this still an issue? Why hasn't anyone fixed this?

I don't know. I have proposed a PR with a workaround...