vaadin-component-factory / breadcrumb

Java API for vcf-breadcrumb
https://incubator.app.fi/breadcrumb-demo/breadcrumbs
Apache License 2.0
2 stars 0 forks source link

Breadcrumb not triggering a beforeLeave Event #14

Open ghost opened 3 years ago

ghost commented 3 years ago

The following is kown:

The BeforeLeaveEvent is triggered only when you navigate via Router, e.g. click RouterLink or call ui.navigate for navigation.
There is a remark in BeforeLeaveObserver JavaDoc
* If a route target is left for reasons not under the control of the navigator* (for instance using* {@link com.vaadin.flow.component.page.Page#setLocation(URI)}, typing a URL* into the address bar, or closing the browser), listeners are not called.

However, the navigation within the Breadcrumb is implemented using Href and Strings. Obviously, someone navigating back using the breadcrumb will loose its data without having been warned.

The implementation should be:

ghost commented 2 years ago

Hi Team, any news on this one ?