WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
240954
<object> fails to load same PDF twice
https://bugs.webkit.org/show_bug.cgi?id=240954
Summary
<object> fails to load same PDF twice
Joe Woods
Reported
2022-05-26 07:27:05 PDT
I believe this is new in Safari Technology preview, but I could be mistaken: * Insert an `<object>` into the DOM, loading a PDF by the data attribute. * Remove that `<object>`. * Insert another `<object>` into the DOM, loading the same PDF by the data attribute. All subsequent times the object should be loaded, the embedded PDF viewer will not work. I have put together a minimal reproduction here:
https://safari-pdf-issue.unstable.email/
Thanks!
Attachments
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2022-05-30 19:38:32 PDT
This reproduces for me with macOS 12.5 beta. Looks like <object> gets a zero length PDF every time except the first load. document.getElementById("add").onclick = function () { const pdf = document.getElementById("pdf"); if (pdf) { pdf.parentNode.removeChild(pdf); } const newPdf = document.createElement("object"); newPdf.setAttribute("data", "/dummy.pdf"); newPdf.setAttribute("type", "application/pdf"); newPdf.setAttribute("id", "pdf"); document.body.appendChild(newPdf); }
Radar WebKit Bug Importer
Comment 2
2022-06-02 07:28:13 PDT
<
rdar://problem/94284319
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug