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

fix(input): climb dom for pointer-events:none targets #1666

Merged
merged 1 commit into from
Apr 7, 2020

Conversation

pavelfeldman
Copy link
Member

No description provided.

src/dom.ts Outdated
@@ -155,6 +160,8 @@ export class ElementHandle<T extends Node = Node> extends js.JSHandle<T> {
result.x += point.x / 4;
result.y += point.y / 4;
}
result.x = (result.x * 100 | 0) / 100;
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's instead round at line 193, to handle _offsetPoint case as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@@ -483,6 +483,10 @@ module.exports.describe = function({testRunner, expect, playwright, FFOX, CHROMI
expect(await page.evaluate(() => window.result)).toBe('Was not clicked');
});

it('should climb dom for pointer-events:none targets', async({page, server}) => {
await page.goto(server.PREFIX + '/input/pointer-events.html');
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: might as well do setContent for easier reading.

await page.setContent('<button><label style="pointer-events:none">Click target</label></button>')

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@pavelfeldman pavelfeldman merged commit 889cf8f into microsoft:master Apr 7, 2020
@pavelfeldman pavelfeldman deleted the pointerEvents branch April 17, 2020 21:12
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