Skip to content
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

[Editor] Avoid error when an editor is unselected during the pdf.js closing #18426

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

calixteman
Copy link
Contributor

It aims to fix an error I noticed in the logs:
JavaScript error: http://127.0.0.1:65159/build/generic/build/pdf.mjs, line 15847: TypeError: can't access property "div", currentLayer is undefined

…losing

It aims to fix an error I noticed in the logs:
JavaScript error: http://127.0.0.1:65159/build/generic/build/pdf.mjs, line 15847:
TypeError: can't access property "div", currentLayer is undefined
@calixteman calixteman requested a review from timvandermeij July 11, 2024 16:50
@calixteman
Copy link
Contributor Author

/botio integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @calixteman received. Current queue size: 0

Live output at: http://54.241.84.105:8877/dd5d609a5cf54ed/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @calixteman received. Current queue size: 1

Live output at: http://54.193.163.58:8877/c9c8ddfbc9e6aa6/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/dd5d609a5cf54ed/output.txt

Total script time: 8.40 mins

  • Integration Tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/c9c8ddfbc9e6aa6/output.txt

Total script time: 18.00 mins

  • Integration Tests: Passed

@timvandermeij
Copy link
Contributor

timvandermeij commented Jul 12, 2024

The change looks good, but the error is still visible in the Windows logs above. Are there perhaps more places that need to be changed? Since it happens near a FreeText test, is

currentLayer.div.append(this.div);
perhaps the culprit given a quick search for currentLayer.div usage?

I do wonder why we would even get in either place if the viewer is already closing, so to make sure we're not wallpapering over an actual issue: is that expected to happen in the first place, or is this error a symptom of another problem?

Copy link
Contributor

@timvandermeij timvandermeij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marking as needs-work because of the question above and I noticed I had an open review request for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants