hawtio / hawtio-core-navigation

The main navigation component for hawtio
Apache License 2.0
1 stars 7 forks source link

Fix fatal exception during click() processing after partial module reload #13

Closed kwesterfeld closed 8 years ago

kwesterfeld commented 8 years ago

For some reason, event handlers are propagating to hawtio-core-navigation "click" handler during $rootScope.$apply, and thus a forever-loop occurs with $rootScope.$apply(), which requires a complete page refresh. This happens frequently with my app since it uses jspm/systemjs with a hot module reloader, and the culprit is here when the user clicks any of the hawtio tabs rendered after one of the views refreshes under the covers.

This fix simply protects $rootScope.$apply with check against $$phase to avoid double-apply (ie. dreaded "already in progress" exception).

kwesterfeld commented 8 years ago

Thanks, Stan!

On Mon, May 2, 2016 at 8:35 AM, Stan Lewis notifications@github.com wrote:

Merged #13 https://github.com/hawtio/hawtio-core-navigation/pull/13.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/hawtio/hawtio-core-navigation/pull/13#event-647528800

gashcrumb commented 8 years ago

@kwesterfeld np! BTW released a new version for ya too if you didn't spot it already...