I had a stability issue with Safari. This was the situation:
- within a
Component
, I have anImage
,Video
andPdfBrowserViewer
instance - only one of these subcomponents is shown at once, controlled by
setVisibility(...)
- the (changing) urls to the data that should be shown is set before the subcomponent is shown
Everything works fine, but in Safari: The second or third requested PDF by using the same PdfBrowserViewer
instance leads the UI to freeze. (I’m already ensuring the PDF is loaded via a Spring MVC endpoint, which allows Content-Range-Requests, as a StreamResource
can’t be used at all for Video or PDFs in Safari, see GitHub issue [#7465]
(https://github.com/vaadin/flow/issues/7465).)
I do not know if the issue has something to do with this addon at all, or if it’s “just” an issue with Safari’s interpretation of object
-elements. But as it took me several hours to find a solution I want to drop it here: When another PDF shall be shown, I now remove the previous PdfBrowserViewer
instance from the layout and add a new instance. No freezes since then.