mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #18374 from calixteman/test_editor_visible
Make sure the editor is visible before getting its rect
This commit is contained in:
commit
03a0500dcf
1 changed files with 1 additions and 1 deletions
|
@ -135,7 +135,7 @@ function getSelector(id) {
|
|||
async function getRect(page, selector) {
|
||||
// In Chrome something is wrong when serializing a `DomRect`,
|
||||
// so we extract the values and return them ourselves.
|
||||
await page.waitForSelector(selector);
|
||||
await page.waitForSelector(selector, { visible: true });
|
||||
return page.$eval(selector, el => {
|
||||
const { x, y, width, height } = el.getBoundingClientRect();
|
||||
return { x, y, width, height };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue