polymer icon indicating copy to clipboard operation
polymer copied to clipboard

Click handlers don't work anymore on iOS with 0.5.0

Open markleusink opened this issue 12 years ago • 3 comments

I'm seeing strange behaviour with click handlers on Mobile Safari (iOS 8.1). With the example below only the first button triggers the alert. The other three elements (2 a's and the second button) don't trigger anything: the first a doesn't even open the website. Tested this with 0.5.0. With 0.4.2 everything works ok.

<!DOCTYPE html>
<html>
<head>

  <meta name="viewport" content="width=device-width, initial-scale=1">

  <!--load the polyfill-->
  <script src="bower_components/webcomponentsjs/webcomponents.js"></script>

  <link rel="import" href="bower_components/polymer/polymer.html"></script>
  <polymer-element name="my-element">

    <template>

        <button onclick="alert('button clicked')">Click me</button>

        <button on-click="{{clickHandler}}">Click me</button>

        <a href="http://www.google.com">Google</a>

        <a on-click="{{clickHandler}}">Polymer click handler</a>

    </template>

    <script>
        Polymer({
            clickHandler : function(event, detail, sender) {
                alert('Polymer click handler');
            }
        });
    </script>

  </polymer-element>

</head>

<body>
  <my-element></my-element>
</body>
</html>

markleusink avatar Nov 12 '14 15:11 markleusink

Note that a result of this is that the Polymer project site is broken on iOS (in Chrome as well as Safari).

markleusink avatar Nov 12 '14 21:11 markleusink

This is a known issue that we're hot fixing today. 0.5.1 will be out soon.

ebidel avatar Nov 12 '14 22:11 ebidel

Should be fixed in 0.5.1

ebidel avatar Nov 14 '14 02:11 ebidel