mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-15 06:02:57 +03:00
chore: remove elementsFromPoint workaround (#13184)
The issue was fixed upstream in r982637.
This commit is contained in:
parent
f3bd910820
commit
faaac318f4
@ -813,10 +813,7 @@ export class InjectedScript {
|
||||
// elementFromPoint works incorrectly in Chromium (http://crbug.com/1188919),
|
||||
// so we use elementsFromPoint instead.
|
||||
const elements: Element[] = container.elementsFromPoint(x, y);
|
||||
let innerElement = elements[0] as Element | undefined;
|
||||
// Workaround https://bugs.chromium.org/p/chromium/issues/detail?id=1307458.
|
||||
if (elements[0] && elements[1] && elements[0].contains(elements[1]) && container.elementFromPoint(x, y) === elements[1])
|
||||
innerElement = elements[1];
|
||||
const innerElement = elements[0] as Element | undefined;
|
||||
if (!innerElement || element === innerElement)
|
||||
break;
|
||||
element = innerElement;
|
||||
|
Loading…
Reference in New Issue
Block a user