polymer icon indicating copy to clipboard operation
polymer copied to clipboard

Bindings near special characters fail in IE11 / IE10

Open kaestlyn opened this issue 11 years ago • 1 comments

I have a pretty simple component to validate this with a binding like so:

<link rel="import" href="../pathto/polymer.html"/>

<dom-module id="my-component">

    <template>
             <p>&copy;</p>
             <p>{{myText}}</p>
    </template>
</dom-module>
<script>
    Polymer({
        is: "my-component",
        properties: {
            myText: {
                type: String,
                value: 'Sample'
            }
        },
    });
</script>

Where myText is a property with any string value. In IE 11 this ends up getting rendered like:

image

Here's a plunker with the issue demonstration: http://plnkr.co/edit/5LDuhpPahqKgR25Z4CZG

I did work around it by making the © being a property as well and databinding it, but this seems a bit excessive for static text.

kaestlyn avatar Jul 13 '15 21:07 kaestlyn

Thanks for finding this strange issue. It looks like in this case IE is splitting up the textNode that contains the binding into 2 nodes as can be seen here: http://jsbin.com/yizawodete/1/edit.

This happens as a result of loading the webcomponents-lite.js but it is unclear why. Since there are likely more cases that can cause text nodes to be split up like this Polymer's bind annotation parser should probably be robust to this scenario.

sorvell avatar Jul 13 '15 23:07 sorvell