capricorn86 / happy-dom

A JavaScript implementation of a web browser without its graphical user interface
MIT License
3.09k stars 185 forks source link

`inert` not blocking user interaction #1422

Open csantos1113 opened 2 months ago

csantos1113 commented 2 months ago

when inert is present, it should block any interaction (focus, click, hover) on the given component.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://stackblitz.com/edit/vitest-dev-vitest-dkwbqj?file=test%2Fbasic.test.tsx,package.json
  2. See error in the test console

Expected behavior Should not be able to click the button with inert property present

Current behavior The button is still clickable

Device:

Additional context

inert should block any interaction on all descendent children, for example:

<div inert>
  <button />
  <input />
</div>

Should block interaction in both elements: button and input.