Use iframe for cross-browser pdf view (pdfjs)

Since some browsers (safari and some mobile ones) don't update their
ui when the src attribute of an embed element changes, an iframe is
used now. But only for the "cross browser" variant.

Fixes: #1210
This commit is contained in:
eikek
2022-02-28 11:20:17 +01:00
parent d70517ad0e
commit 78448991ca
2 changed files with 34 additions and 6 deletions

View File

@ -85,12 +85,12 @@ view texts flags settings model pos attach =
, style "max-height" "calc(100vh - 140px)"
, style "min-height" "500px"
]
[ embed
[ src <| Data.UiSettings.pdfUrl settings flags fileUrl
, class "absolute h-full w-full top-0 left-0 mx-0 py-0"
[ Data.UiSettings.pdfView settings
flags
fileUrl
[ class "absolute h-full w-full top-0 left-0 mx-0 py-0"
, id "ds-pdf-view-iframe"
]
[]
]
]