emberjs / emberjs/ember-test-helpers

`fillIn` treats text as html when the target is content editable

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

Description

Example:
```js
fillIn(contentEditableElement, '

foo
');
```
The text gets parsed as html though I'd expect it to be treated as text.

Should `fillIn` set `textContent` instead of `innerHTML`?
https://github.com/emberjs/ember-test-helpers/blob/0505fdf8d581ebe78a1078db711b06cfc65e321c/addon/src/dom/fill-in.ts#L76

Contributor guide

Open the contributing guide

Research direction

Start with addon/src/dom/fill-in.ts at line 76 and reproduce the issue using a contenteditable element and the provided fillIn example. Check the current handling of the supplied HTML-like text and verify that the completed behavior preserves it as text rather than parsing it as HTML.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.