Hyperhtml: Textarea renders with text "null" when value is null (in Edge)

Created on 30 Apr 2019  路  6Comments  路  Source: WebReflection/hyperHTML

Textarea with passed value as null renders with text "null".
See the following snippet and compare Chrome and Edge:
https://codepen.io/anon/pen/eoaBjj

Expected behavior: render empty textarea

Reproduces on Edge 18.17763

bug

All 6 comments

I think this is similar to the other bug, and related to _domtagger_.

I will keep this open until both are fixed.

FYI this works in Edge too:

hyperHTML.bind(document.body)`
<textarea rows="3">${value}</textarea>
`;

basically this is a stupid issue in Edge that won't likely ever get fixed.

the bugs boils down to this:

document.body.appendChild(
  document.createElement('textarea')
).value = null;

where even removing the attribute after won't clean the textrea.

I'll think about a solution, but you have at least a workaround

@WebReflection , I used this, but we need to listen event oninput and in this case another bug of IE found 馃檪

When hyperHTML sets value through textContent, IE triggers event oninput. This is a problem for us.
IE bug repro: https://jsbin.com/yuqequgudo/1/edit?html,js,output

P.S. We fixed it just through check if value is empty:
`` hyperHTML.bind(document.body)