This repository was archived by the owner on May 11, 2026. It is now read-only.
v2.0.0
This major release introduces a new feature where the currently focused element (document.activeElement) will get a data-happo-focus attribute. This informs Happo workers to (re)focus the element when the html is rendered in a browser controlled by Happo.
The breaking change is that if you were already using data-happo-focus attributes to focus elements in Happo screenshots, you now have to switch to focusing the element in your end-to-end test. As an example, here's how that could look like in a Cypress test:
cy.get('input').first().focus()
Remember to also set applyPseudoClasses: true in your .happo.js config for each target. Docs here: https://docs.happo.io/docs/configuration#target-applypseudoclasses