diff --git a/testing/harness.ts b/testing/harness.ts index 0ac4994513..a018132b74 100644 --- a/testing/harness.ts +++ b/testing/harness.ts @@ -552,6 +552,9 @@ export class Harness { protected simulateMousePress( element: HTMLElement, init: PointerEventInit = {}) { this.addPseudoClass(element, ':active'); + this.forEachNodeFrom(element, el => { + this.addPseudoClass(el, ':active'); + }); const mouseInit = this.createMouseEventInit(element); const pointerInit: PointerEventInit = { ...mouseInit, @@ -574,6 +577,9 @@ export class Harness { protected simulateMouseRelease( element: HTMLElement, init: PointerEventInit = {}) { this.removePseudoClass(element, ':active'); + this.forEachNodeFrom(element, el => { + this.removePseudoClass(el, ':active'); + }); const mouseInit = this.createMouseEventInit(element); const pointerInit: PointerEventInit = { ...mouseInit, @@ -596,6 +602,9 @@ export class Harness { element: HTMLElement, init: PointerEventInit = {}, touchInit: TouchEventInit = {}) { this.addPseudoClass(element, ':active'); + this.forEachNodeFrom(element, el => { + this.addPseudoClass(el, ':active'); + }); const mouseInit = this.createMouseEventInit(element); const pointerInit: PointerEventInit = { ...mouseInit, @@ -628,6 +637,9 @@ export class Harness { element: HTMLElement, init: PointerEventInit = {}, touchInit: TouchEventInit = {}) { this.removePseudoClass(element, ':active'); + this.forEachNodeFrom(element, el => { + this.removePseudoClass(el, ':active'); + }); const mouseInit = this.createMouseEventInit(element); const pointerInit: PointerEventInit = { ...mouseInit, @@ -655,6 +667,9 @@ export class Harness { element: HTMLElement, init: PointerEventInit = {}, touchInit: TouchEventInit = {}) { this.removePseudoClass(element, ':active'); + this.forEachNodeFrom(element, el => { + this.removePseudoClass(el, ':active'); + }); const mouseInit = this.createMouseEventInit(element); const pointerInit: PointerEventInit = { ...mouseInit,