LaxarJS / laxar

Building large applications is hard, so don't do that!
http://laxarjs.github.io/laxar/laxar-latest
MIT License
24 stars 11 forks source link

Stop publish events after page navigation #486

Closed jonaswjs closed 6 years ago

jonaswjs commented 6 years ago

Widgets should not publish events after a page navigation.

When a widget is publishing an event immediately after a response of an http request the application could be on a new page. For Example if the request is taking some time.

How @jpommerening mentioned we should set a stopPublishingEvents = true in release() and test it in publish(): https://github.com/LaxarJS/laxar/blob/3a80b0ca9e3c8a32e6008b99af5a8c568adc5f7c/lib/runtime/widget_services.js#L663

x1B commented 6 years ago

Fixed on master (v2.1.0) and release-2.0.x (v2.0.5).