Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

Conversation

@owencm
Copy link

@owencm owencm commented Feb 13, 2015

I was wondering why the ugly grey toggle was being applied to these buttons, turns out paper-button-base was looking to see whether toggle was set on the element (it has an "if (this.toggle)") but paper-dropdown overloaded toggle with the a function, causing "if (this.toggle)" to resolve to true due to JS's lack of type system.

Either way, renaming the on-tap event here to anything other than toggle (I chose toggleDropdown) fixes the issue.

Review on Reviewable

I was wondering why the ugly grey toggle was being applied to these buttons, turns out paper-button-base was looking to see whether toggle was set on the element (it has an "if (this.toggle)") but paper-dropdown overloaded toggle with the a function, causing "if (this.toggle)" to resolve to true due to JS's lack of type system.

Either way, renaming the on-tap event here to anything other than toggle (I chose toggleDropdown) fixes the issue.
@addyosmani
Copy link

Thanks Owen. This workaround LGTM. Deferring to @morethanreal for her review.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants