Dropdown menu: bug with Polymer 2.0
Hi stackoverflow users,
I want to use the resin 2.0 paper dropdown menu, but when I click on the item, an error occurs:
Uncaught TypeError: Cannot assign to read only property 'target' of object '#<AnimationPlaybackEvent>'
at b.Animation.<anonymous> (web-animations-next-animation.js:223)
I have the # 2.0-preview dropdown menu set.
I tried a very simple example code from the docs:
<paper-dropdown-menu label="Dinosaurs">
<paper-listbox class="dropdown-content" selected="1">
<paper-item>allosaurus</paper-item>
<paper-item>brontosaurus</paper-item>
<paper-item>carcharodontosaurus</paper-item>
<paper-item>diplodocus</paper-item>
</paper-listbox>
</paper-dropdown-menu>
could you help me?
Thank.
Phil
source to share
It looks like a compatibility issue with web-animations-js library. They released a build on April 13, 2017, which started leading to this issue with the 1.8 version of paper-drowpdown-menu. Anyone doing a bower update after this date is likely to see the same behavior until it gets resolved.
Adding this file to your bower.json file should correct your behavior:
"web animation-js": "web animation / web animation-js # 2.2.2"
I posted a dropdown issue due to this dependency: https://github.com/PolymerElements/paper-dropdown-menu/issues/241
source to share