{"version":3,"file":"daffodil-design-testing.mjs","names":[],"sources":["../../../libs/design/testing/src/patch-element-focus.ts"],"sourcesContent":["/**\n * Replaces the element's native focus/blur methods with ones that dispatch the corresponding events directly,\n * so tests do not depend on the document actually having focus. Chrome only\n * moves `document.activeElement` without firing focus events when the document\n * is unfocused, which makes native-focus-driven tests order-dependent.\n *\n * This originally comes from https://github.com/angular/components/blob/7d09f9153fabfe4cdd13a096d9e6d43f472812e5/src/cdk/testing/testbed/fake-events/element-focus.ts#L30\n */\nexport function patchElementFocus(element: HTMLElement): void {\n  element.focus = () => element.dispatchEvent(new Event('focus'));\n  element.blur = () => element.dispatchEvent(new Event('blur'));\n}\n"],"mappings":"AAQA,SAAgB,kBAAkB,SAAoB;CACpD,QAAQ,cAAc,QAAQ,cAAc,IAAI,MAAM,OAAO,CAAC;CAC9D,QAAQ,aAAa,QAAQ,cAAc,IAAI,MAAM,MAAM,CAAC;AAC9D"}