googlearchive / TemplateBinding

TemplateBinding Prolyfill
290 stars 61 forks source link

SELECT/OPTION creation with template repeat not working on iPhone #118

Closed krisnye closed 11 years ago

krisnye commented 11 years ago

This works fine on chrome. Fails on my iPhone 4 iOS 6.1.3

<!DOCTYPE html>
<html>
  <head>
    <script src="polymer.min.js" debug></script>
    <element name="v-bug">
        <template>
            <select>
                <template repeat="{{options}}">
                    <option>{{}}</option>
                </template>
            </select>
        </template>
        <script>
        Polymer.register(this, {
            options: [ "One", "Two", "Three" ]
        });
        </script>
    </element>
  </head>
  <body>
    <v-bug></v-bug>
  </body>
</html>
dfreedm commented 11 years ago

<template> on iOS has to be polyfilled, and <select> kicks out anything that isn't an <option> before parsing, thus cannot be polyfilled correctly.

Try <option template repeat="{{options}}">

krisnye commented 11 years ago

Can you provide a working sample similar to above?

dfreedm commented 11 years ago
    <!DOCTYPE html>
    <html>
      <head>
        <script src="polymer.min.js" debug></script>
        <element name="v-bug">
            <template>
                <select>
                    <option template repeat="{{options}}">{{}}</option>
                </select>
            </template>
            <script>
            Polymer.register(this, {
                options: [ "One", "Two", "Three" ]
            });
            </script>
        </element>
      </head>
      <body>
        <v-bug></v-bug>
      </body>
    </html>
dfreedm commented 11 years ago

well, this jsbin should work: http://jsbin.com/ogoyet/2/edit

rafaelw commented 11 years ago

Dan is correct. Sorry this isn't yet better documented