Skip to content

Commit

Permalink
fix: Use innerHTML rather than innerText for textareas (#317)
Browse files Browse the repository at this point in the history
This is so we can properly capture HTML content in textareas.
  • Loading branch information
Robdel12 authored Aug 6, 2019
1 parent 6432b63 commit b700fbb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 27 deletions.
36 changes: 11 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/percy-agent-client/dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ class DOM {

break
case 'textarea':
// setting text or value does not work but innerText does
cloneEl!.innerText = elem.value
// setting text or value does not work but innerHTML does
cloneEl!.innerHTML = elem.value
break
default:
cloneEl!.setAttribute('value', elem.value)
Expand Down

0 comments on commit b700fbb

Please sign in to comment.