-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent the Document Properties from being empty when the dialog is opened before the file has started loading #4546
Prevent the Document Properties from being empty when the dialog is opened before the file has started loading #4546
Conversation
…pened before the file has started loading
/botio-windows preview |
From: Bot.io (Windows)ReceivedCommand cmd_preview from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.22.172.223:8877/662ae9e033480cb/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/662ae9e033480cb/output.txt Total script time: 0.49 mins Published
|
I cannot replicate the |
It can be tricky to reproduce, since it requires that you manage to open the Document Properties after the viewer itself is loaded, but before the PDF file has begun loading.
So, is this PR good to go then? :-) |
…en the dataAvailablePromise is resolved
/botio-linux preview |
From: Bot.io (Linux)ReceivedCommand cmd_preview from @yurydelendik received. Current queue size: 0 Live output at: http://107.21.233.14:8877/8be769121390b00/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/8be769121390b00/output.txt Total script time: 0.42 mins Published
|
…for-data Prevent the Document Properties from being empty when the dialog is opened before the file has started loading
Thanks |
Currently when opening the Document Properties during file load, all fields will remain blank, with the following message printed in the console:
TypeError: PDFView.pdfDocument is null
.This PR adds a promise that is resolved when the data is available, and also re-factors the code slightly to add a
updateUI
function so that the file size is updated once it's available./cc @timvandermeij