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

browser(firefox): another way to report elements without layout object #2597

Merged
merged 1 commit into from
Jun 17, 2020
Merged

browser(firefox): another way to report elements without layout object #2597

merged 1 commit into from
Jun 17, 2020

Conversation

dgozman
Copy link
Contributor

@dgozman dgozman commented Jun 17, 2020

Previous attempt was wrong for visibility:hidden elements, and also for zero-sized elements like <br>. This one should match other browsers.

Previous attempt was wrong for visibility:hidden elements, and also for
zero-sized elements like <br>. This one should match other browsers.
if (!rect)
rect = { x: -1, y: -1, width: -1, height: -1};
if (unsafeObject.scrollRectIntoViewIfNeeded)
unsafeObject.scrollRectIntoViewIfNeeded(rect.x, rect.y, rect.width, rect.height);
else
throw new Error('Node type does not support scrollRectIntoViewIfNeeded');
throw new Error('Node does not have a layout object');
Copy link
Member

Choose a reason for hiding this comment

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

We should change the wording here to something more clear, what is layout object?

@yury-s yury-s merged commit ab5f5c8 into microsoft:master Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants