Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dom-repeat using select and option tags not working on IE11 #1735

Open
frasator opened this issue Jun 3, 2015 · 18 comments
Open

dom-repeat using select and option tags not working on IE11 #1735

frasator opened this issue Jun 3, 2015 · 18 comments

Comments

@frasator
Copy link

frasator commented Jun 3, 2015

This works on chrome, safari 8 and firefox, but no in ie11

To test it use this simple html file

<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Test</title>
    <script src="bower_components/webcomponentsjs/webcomponents-lite.js"></script>
    <link rel="import" href="bower_components/polymer/polymer.html">
    <style>
        html, body {
            width: 100%;
            height: 100%;
            margin: 0;
        }
    </style>
</head>

<body>

<template is="dom-bind" id="app">

    <select>
        <template is="dom-repeat" items="{{options}}" as="o">
            <option value="{{o}}">{{o}}</option>
        </template>
    </select>

</template>


<script>
    (function (document) {
        'use strict';

        var app = document.querySelector('#app');
        app.options = ['one', 'two'];

    })(document);
</script>

</body>
</html>
@robrez
Copy link

robrez commented Jun 3, 2015

@arthurevans
Copy link

The problem here is that IE's parser doesn't think <template> belongs in a <select>, so it helpfully removes it for you. <select> and <table> are among the "parser-challenged elements" referred to here:

https://www.polymer-project.org/1.0/docs/#binding-features

@robrez is correct that we had a workaround for this issue in 0.5. We don't have it yet for 1.0. One option is to use a custom element instead of the <select>.

@kevinpschaaf kevinpschaaf added the p2 label Jun 4, 2015
@kevinpschaaf kevinpschaaf self-assigned this Jun 4, 2015
@frasator
Copy link
Author

frasator commented Jun 4, 2015

Ok, thank you

@ghost
Copy link

ghost commented Jun 11, 2015

is there a date when this issue will be fixed?
we are currently unable to migrate our polymer 0.5 app because it contains many tables and select elements with templates and it needs to work in IE/Edge

@DmitryOlkhovoi
Copy link

oh why people are still using IE :)?

@tuespetre
Copy link

@DominikMayrhofer

Selects are easy enough to work around:

var options = [ ... ];
var select = this.$.yourSelectElement;

options.forEach(function (item) {
    var option = document.createElement('option');
    option.textContent = item.Text;
    option.value = item.Value;
    select.appendChild(option);
});                                    

Tables are virtually the same, but possibly more arduous

@ssshake
Copy link

ssshake commented Mar 4, 2016

it's been quite some time was this ever fixed?

@tuespetre
Copy link

@ssshake don't think so, I proposed a new feature in #3448 to address it

@tuespetre
Copy link

@ssshake no word, it got labelled 'enhancement/needs discussion' by a Polymer team member. Will have to wait and see. Re-rendering on item changes is definitely a pain point.

@ssshake
Copy link

ssshake commented Mar 11, 2016

hey there, we've authored a polymer component that works around this select in IE issue pretty well (at least we think so). We'd really love some feedback. https://github.com/vehikl/polymer-select-with-options

keskival pushed a commit to keskival/oskari that referenced this issue Apr 15, 2016
…e with table and select elements in Internet Explorer. See Polymer bugs: Polymer/polymer#1735 and Polymer/polymer#1567
@eugef
Copy link

eugef commented May 24, 2016

@ssshake thanks for sharing the solution for select

@tvdinh
Copy link

tvdinh commented Jun 5, 2016

This could be another way: https://github.com/Juicy/juicy-select

@emilbillberg
Copy link

Is this still an issue in Polymer 2?

@sanjeevpande
Copy link

Still an issue with Polymer 2. Please fix.

@ebatgerel
Copy link

Is this issue still not fixed ? Any suggestion ?

@stale
Copy link

stale bot commented Mar 13, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 13, 2020
@Narendra95-Kumar
Copy link

oh why people are still using IE :)?

That's a very intelligent question. I also feel the same way, in fact why IE is still there.

@stale stale bot removed the wontfix label Jul 20, 2020
@stale
Copy link

stale bot commented Jul 21, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests