-
Notifications
You must be signed in to change notification settings - Fork 10.3k
[GENERIC viewer] Re-initialize the viewer-toolbar ColorPicker
for each PDF document
#19372
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
[GENERIC viewer] Re-initialize the viewer-toolbar ColorPicker
for each PDF document
#19372
Conversation
…ach PDF document Steps to reproduce this in `master`: 1. Open https://mozilla.github.io/pdf.js/web/viewer.html 2. Use the "Open"-button (in the secondaryToolbar), or drag-and-drop, to load another PDF document. 3. Enable the highlight-editor. 4. Try to pick a new colour. Note how it's no longer possible to change the default highlight-colour. The reason for this is that we're only initializing the viewer-toolbar `ColorPicker` *once*, which doesn't work since every PDF document gets its own `AnnotationEditorUIManager`-instance. To address this we simply need to re-initialize the viewer-toolbar `ColorPicker`, and note that this patch won't affect the Firefox PDF Viewer.
dd31967
to
342b5e2
Compare
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/f62181344e02cdf/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/f62181344e02cdf/output.txt Total script time: 0.85 mins Published |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you.
/botio integrationtest |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/68b7f86d0768b10/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @Snuffleupagus received. Current queue size: 1 Live output at: http://54.193.163.58:8877/8e3661449b121ff/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/68b7f86d0768b10/output.txt Total script time: 11.80 mins
|
/botio-linux integrationtest |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/c9b539fd0e92051/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/c9b539fd0e92051/output.txt Total script time: 11.18 mins
|
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/8e3661449b121ff/output.txt Total script time: 25.75 mins
|
Steps to reproduce this in
master
:Note how it's no longer possible to change the default highlight-colour.
The reason for this is that we're only initializing the viewer-toolbar
ColorPicker
once, which doesn't work since every PDF document gets its ownAnnotationEditorUIManager
-instance. To address this we simply need to re-initialize the viewer-toolbarColorPicker
, and note that this patch won't affect the Firefox PDF Viewer.