Fix PDF/MediaElement blank left panel bug (resolves #1402)#1404
Fix PDF/MediaElement blank left panel bug (resolves #1402)#1404demiankatz merged 9 commits intoUniversalViewer:release-4.2.0from
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
demiankatz
left a comment
There was a problem hiding this comment.
Thanks, @jamesmisson -- one small observation for starters! :-)
src/content-handlers/iiif/modules/uv-resourcesleftpanel-module/ResourcesLeftPanel.ts
Outdated
Show resolved
Hide resolved
demiankatz
left a comment
There was a problem hiding this comment.
This definitely solves the problem for me. I'm never in love with using setTimeout, but it seems like it's probably necessary here, at least until we refactor the architecture. I'm going to approve this; feel free to take out of draft mode when comfortable.
I'm definitely interested in hearing from others as well!
|
@jamesmisson, @demiankatz, Thanks for the fix! I've tested both PDF and media files on my end, and it looks like this change successfully resolves the issue described in #1402. The left panel now displays correctly without going blank. I've attached a screenshot from my testing for reference. Great work on getting this sorted! @jamesmisson, I saw your comment on the issue about how it appears on your side. I tested it again and cleared my browsing history, just to be sure, and everything seems to be working fine now. Just out of curiosity, are you using Chrome or Edge? I've noticed that Edge can sometimes behave a bit differently during testing. I tried both browsers, and things looked good in each case. |
|
Merged as per discussion at today's stand-up. |


This should fix #1402
When viewing IIIF content, there is a 1ms delay to the 'main' div in the left panel resizing in ContentLeftPanel.ts. For PDFs and media, the thumbsView is rendered in ResourcesLeftPanel.ts, so I think the problem was that the thumbnail div wasn't being resized in the same way/at the same time, so it was resizing before the panel expansion animation had finished. I've added the same delay (1ms) and set the width to 100% after that.
I haven't tested this very thoroughly, please give it a hammering and see what happens!