emberjs/ember-test-helpers

Input events should be instantiated with `{ composed: true }`

开放

#1,201 创建于 2022年3月3日

 (2 条评论) (1 个反应) (0 位负责人)JavaScript (256 个派生)github user discovery
enhancementgood first issue

仓库指标

星标
 (188 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

The composed property determines whether an event that occurs in shadow DOM will bubble to the host element.

Link to MDN docs.

In HTML, all form control input events are composed 1 2.

Presently, we are not instantiating input events with { composed: true }. See for example fillIn and select. I have not looked if there are other places. It probably makes sense to make this change in fireEvent itself similar to how bubbles is true by default.

Footnotes

  1. Search for "Fire an event named input" on https://html.spec.whatwg.org/multipage/input.html and https://html.spec.whatwg.org/multipage/form-elements.html.

  2. Change events are not composed.

贡献者指南