developit / developit/tags-input
Keyboard events created with DOM don't trigger
- 主要语言
- JavaScript
- 星标
- 333
- 派生
- 46
- PR 合并指标
- 30 天内没有已合并 PR
描述
There is a [known bug with Webkit](https://bugs.webkit.org/show_bug.cgi?id=16735) where KeyboardEvents created by the DOM have keyCode and charCode of 0, thus preventing us from manually triggering 'change' or 'input' events with this library.
I have managed to create a workaround by triggering a 'blur' Event on the input, but ultimately triggering the KeyboardEvent with a Tab or Comma would have been a better way of interacting.
Native JavaScript, particularly JS packages, is not my forte but I'm sure a simple solution to this issue would be to modify the event listeners to work off Keys rather than KeyCodes.
贡献指南
这个仓库没有索引到贡献指南
调研方向
首先重现 issue 中描述的 WebKit 行为:由 DOM 创建的 KeyboardEvents 的 keyCode 和 charCode 被设置为 0。检查该库的 event listeners,并调查它们是否可以使用 keys 而不是 key codes,然后验证 Tab 或 Comma 是否可以在不依赖 blur 的情况下触发预期的输入或更改行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- frontend
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100