Bug 1579186 Comment 7 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

We've got [a report](https://github.com/webcompat/web-bugs/issues/54188) that seems to be related to this issue, except the child element is a contenteditable div. I've attached a reduced test case. 

The site is using the following code: 

```js
{
                key: "onInput",
                value: function() {
                    var e = this.foreignObject.firstElementChild;
                    this.text = e.innerText,
                    this.setSize(u.svgTextSize(this.text, this.props)),
                    this.textNode.innerHTML = u.svgText(this.text, this.props).innerHTML,
                    this.changed(l.TEXT_LAYER_INPUT_CHANGE, {
                        id: this.contentId,
                        text: this.text
                    })
                }
            } 
```
`e.innerText` is an empty string, which causes an issue with calculations later on in `this.setSize`. A workaroud is setting `this.text = e.innerText || e.textContent`.
We've got [a report](https://github.com/webcompat/web-bugs/issues/54188) that seems to be related to this issue, except the child element is a contenteditable div. I've attached a reduced test case. 

The site is using the following code: 

```js
{
                key: "onInput",
                value: function() {
                    var e = this.foreignObject.firstElementChild;
                    this.text = e.innerText,
                    this.setSize(u.svgTextSize(this.text, this.props)),
                    this.textNode.innerHTML = u.svgText(this.text, this.props).innerHTML,
                    this.changed(l.TEXT_LAYER_INPUT_CHANGE, {
                        id: this.contentId,
                        text: this.text
                    })
                }
            } 
```
`e.innerText` is an empty string in this case, similarly to the initial testcase, which causes an issue with calculations later on in `this.setSize`.

Back to Bug 1579186 Comment 7