PolymerElements / neon-animation

Polymer + Web Animations
https://www.webcomponents.org/element/PolymerElements/neon-animation
143 stars 98 forks source link

iron-activate not fired on neon-animated-pages #130

Open jarrodek opened 8 years ago

jarrodek commented 8 years ago

The neon-animated-pages do not fire iron-activate when selected property change.

Expected outcome

When the selection for neon-animated-pages change on-iron-activate handler should be called.

Actual outcome

Nothing happens.

Steps to reproduce

1) Code similar to PSK index.html page but iron-pages is replaced with neon-animated-pages:

<template is="dom-bind" id="app">
  <neon-animated-pages id="pages" on-iron-activate="_testEvent" on-iron-deselect="_testEvent" on-iron-select="_testEvent" attr-for-selected="data-route" selected="[[route]]">
    <neon-animatable data-route="a">A</neon-animatable>
    <neon-animatable data-route="b">B</neon-animatable>
  </neon-animated-pages>
</template>

In app.js:

let app = document.querySelector('#app');
app._testEvent = function(e, b) {
    console.log(e.type, e, b);
};

2) Change route value to a or b:

document.querySelector('#app').route = 'a';

3) You'll see only two events In the console: iron-deselect and iron-select. But no iron-activate. Since - according to docs - iron-activate is the only event that can be canceled it is crucial to have it working.

Zecat commented 8 years ago

If I am not mistaken, the iron-activateevent is only fired when the selection came from the activateEvent, the doc of IronSelectableBehavior is just not clear about that.

dominik0711 commented 8 years ago

Right now it's only possible to use on-iron-select or on-iron-deselect due to the described bug above. Is there a schedule for this bug fix?