mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-06-05 09:41:01 +02:00
The problem is that we screenshot the page itself rather than the canvas, even though we specifically care about the latter according to the comment, which means that we manually have to take care of hiding and showing the annotation editor. This is problematic because even though we signal that the annotation editor should be hidden, we don't wait until that is actually done, which leads to a situation where we can take the screenshot before the annotation editor is actually invisible in the view. This commit fixes the issue by screenshotting the canvas instead, which avoids the need for manually hiding/showing the annotation editor. This makes the test less fragile, and matches other tests better.