Fixed drop-down bug, for now

Expect it to break again in Chrome 54
This commit is contained in:
Stefan Zermatten
2016-10-03 14:05:30 +02:00
parent d83fe917d0
commit ebecb46935
5 changed files with 19 additions and 20 deletions

View File

@@ -19,10 +19,5 @@
"core-elements": "Polymer/core-elements#~0.5.5", "core-elements": "Polymer/core-elements#~0.5.5",
"paper-elements": "Polymer/paper-elements#~0.5.5", "paper-elements": "Polymer/paper-elements#~0.5.5",
"paper-fab-menu": "cwdoh/paper-fab-menu#~0.4.0" "paper-fab-menu": "cwdoh/paper-fab-menu#~0.4.0"
},
"resolutions": {
"core-component-page": "^0.5.0",
"polymer": "^0.5.0",
"webcomponentsjs": "^0.5.0"
} }
} }

View File

@@ -20,7 +20,6 @@
<link rel="import" href="/components/paper-dialog/paper-action-dialog.html"> <link rel="import" href="/components/paper-dialog/paper-action-dialog.html">
<link rel="import" href="/components/paper-dialog/paper-dialog.html"> <link rel="import" href="/components/paper-dialog/paper-dialog.html">
<link rel="import" href="/components/paper-dialog/paper-dialog-transition.html"> <link rel="import" href="/components/paper-dialog/paper-dialog-transition.html">
<link rel="import" href="/components/paper-dropdown/paper-dropdown.html">
<link rel="import" href="/components/paper-fab/paper-fab.html"> <link rel="import" href="/components/paper-fab/paper-fab.html">
<link rel="import" href="/components/paper-fab-menu/paper-fab-menu.html"> <link rel="import" href="/components/paper-fab-menu/paper-fab-menu.html">
<link rel="import" href="/components/paper-icon-button/paper-icon-button.html"> <link rel="import" href="/components/paper-icon-button/paper-icon-button.html">
@@ -40,4 +39,5 @@
<!--custom components--> <!--custom components-->
<link rel="import" href="/custom_components/paper-dropdown-menu/paper-dropdown-menu.html"> <link rel="import" href="/custom_components/paper-dropdown-menu/paper-dropdown-menu.html">
<link rel="import" href="/custom_components/paper-dropdown/paper-dropdown.html">
<link rel="import" href="/custom_components/paper-diff-slider/paper-diff-slider.html"> <link rel="import" href="/custom_components/paper-diff-slider/paper-diff-slider.html">

View File

@@ -1,5 +1,10 @@
{ {
"imports": [ "imports": [
"/custom_components/paper-dropdown/paper-dropdown.html",
"/custom_components/paper-dropdown-menu/paper-dropdown-menu.html",
"/custom_components/paper-diff-slider/paper-diff-slider.html",
"/custom_components/swipe-detect/swipe-detect.html",
"/components/core-animated-pages/core-animated-pages.html", "/components/core-animated-pages/core-animated-pages.html",
"/components/core-animated-pages/transitions/cross-fade.html", "/components/core-animated-pages/transitions/cross-fade.html",
"/components/core-animated-pages/transitions/hero-transition.html", "/components/core-animated-pages/transitions/hero-transition.html",
@@ -35,11 +40,6 @@
"/components/paper-slider/paper-slider.html", "/components/paper-slider/paper-slider.html",
"/components/paper-tabs/paper-tabs.html", "/components/paper-tabs/paper-tabs.html",
"/components/paper-toast/paper-toast.html", "/components/paper-toast/paper-toast.html",
"/components/paper-toggle-button/paper-toggle-button.html", "/components/paper-toggle-button/paper-toggle-button.html"
"/custom_components/paper-dropdown/paper-dropdown.html",
"/custom_components/paper-dropdown-menu/paper-dropdown-menu.html",
"/custom_components/paper-diff-slider/paper-diff-slider.html",
"/custom_components/swipe-detect/swipe-detect.html"
] ]
} }

View File

@@ -18,9 +18,9 @@ enable the optional list cascade transition.
@extends core-transition-css @extends core-transition-css
@status unstable @status unstable
--> -->
<link href="../polymer/polymer.html" rel="import"> <link href="../../components/polymer/polymer.html" rel="import">
<link href="../core-transition/core-transition-css.html" rel="import"> <link href="../../components/core-transition/core-transition-css.html" rel="import">
<link href="../core-animation/web-animations.html" rel="import"> <link href="../../components/core-animation/web-animations.html" rel="import">
<polymer-element name="paper-dropdown-transition" extends="core-transition-css"> <polymer-element name="paper-dropdown-transition" extends="core-transition-css">
<template> <template>
@@ -41,7 +41,7 @@ enable the optional list cascade transition.
* @type number * @type number
* @default 500 * @default 500
*/ */
duration: 500 duration: 350
}, },
@@ -160,9 +160,9 @@ enable the optional list cascade transition.
})); }));
} }
var group = new AnimationGroup(anims, { var group = new AnimationGroup(anims/*, {
easing: 'cubic-bezier(0.4, 0, 0.2, 1)' easing: 'cubic-bezier(0.4, 0, 0.2, 1)'
}); }*/);
this.player = document.timeline.play(group); this.player = document.timeline.play(group);
this.player.onfinish = function() { this.player.onfinish = function() {
this.fire('core-transitionend', this, node); this.fire('core-transitionend', this, node);
@@ -172,9 +172,8 @@ enable the optional list cascade transition.
this.fire('core-transitionend', this, node); this.fire('core-transitionend', this, node);
} }
}, },
}); });
</script> </script>
</polymer-element> </polymer-element>
<paper-dropdown-transition id="paper-dropdown-transition"></paper-dropdown-transition> <paper-dropdown-transition id="paper-dropdown-transition"></paper-dropdown-transition>

View File

@@ -40,6 +40,8 @@ Style the background color of the dropdown with these selectors:
<link href="../../components/core-dropdown/core-dropdown.html" rel="import"> <link href="../../components/core-dropdown/core-dropdown.html" rel="import">
<link href="../../components/paper-shadow/paper-shadow.html" rel="import"> <link href="../../components/paper-shadow/paper-shadow.html" rel="import">
<link href="paper-dropdown-transition.html" rel="import">
<style shim-shadowdom> <style shim-shadowdom>
html /deep/ paper-dropdown { html /deep/ paper-dropdown {
position: absolute; position: absolute;
@@ -99,6 +101,9 @@ Style the background color of the dropdown with these selectors:
<script> <script>
Polymer({ Polymer({
publish: { //Chrome 52 breaks this
transition: 'paper-dropdown-transition'
},
ready: function() { ready: function() {
this.super(); this.super();
this.sizingTarget = this.$.scroller; this.sizingTarget = this.$.scroller;