Open thomasharre opened 2 years ago
The popup is implemented using vaadin-overlay component. And I am now contemplating what is the correct action here.
One approach is to conclude that the solution above is the correct one and should be used in with Popup, and if necessary with other components utilizing vaadin-overlay (e.g. Notification, Tooltip, Dialog, ...)
Or should there be some change done in vaadin-overlay itself (then all the components using it, would inherit the fix, not just the Popup)
Or should all the components utilizing vaadin-overlay be fixed individually as per need arises.
With some research I found that the same problem has been reported with Dialog as well
If a Popup is open and the user uses the browser-back (or forward) he navigates to the previous page but the Popup stays visible. Ideally the PopUp would automatically disappear when the Component it is for is detached.
Initially I thought I would solve this by adding a BeforeLeaveObserver, so something like
But that did not work.
Markus then found this solution that works:
So could the popup be changed, to either disappear automatically or to always disappear when hide is called?