emberjs / emberjs/ember-test-helpers

TriggerKeyEvent - Backspace - Browser actively blocks from actually happening

Open
#626 3 comments 10 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
188
Forks
254
PR merge metrics
No merged PRs in 30d

Description

Issue
---
When using the `triggerKeyEvent` with key of **Backspace** the browser actively blocks the interaction from happening on the input. Upon some research I discovered the browser event has a key of `isTrusted` when triggered by the test-helper that is set to false. But when manually inputing `backspace` during a pauseTest the `isTrusted` is set to true. Resulting in expected behavior.

Demo
---
[CodeSandBox](https://codesandbox.io/embed/314lo157mq)
[Tests](https://314lo157mq.sse.codesandbox.io/tests)
[Test Gist](https://gist.github.com/nicksteffens/89647189301b962aac2faaa420b6a5c6)

Edited: Added Gist

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.