Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event bubbling can be disabled for binary state components #27

Merged
merged 1 commit into from
Sep 1, 2017

Conversation

vkkostin
Copy link
Contributor

@vkkostin vkkostin commented Aug 30, 2017

Implements new mixin supports-bubbles-false, that would disable click event propagation if bubbles=false is passed into the component.

Implements this feature for radio buttons, checkboxes, and switches.

Example implementation (the alert will not show if you specifically click the switch):

  <div onclick="alert('You will not be alerted')">
    {{mdc-switch bubbles=false}}
  </div>

@vkkostin vkkostin force-pushed the disable-event-bubbling branch from 6f0390e to 8433a4d Compare September 1, 2017 15:27
@Kerrick
Copy link
Contributor

Kerrick commented Sep 1, 2017

I'm not sure why Travis CI is failing -- I was able to check out your branch locally and everything passed, so I'm going to blame Travis and merge it.

@Kerrick Kerrick merged commit 16cd183 into master Sep 1, 2017
Kerrick added a commit that referenced this pull request Sep 7, 2017
- ⬆️ Upgrade @Material packages to 0.19 versions
    - 💥 Change "accent" to "secondary" globally, as done by MDC-Web.
      material-components/material-components-web#1116
    - ✨ `{{mdc-button}}` now has `unelevated` boolean attribute (default: `false`)
    - ✨ `{{mdc-button}}` now has `dense` boolean attribute (default: `false`)
    - ✨ `{{mdc-button}}` now has `compact` boolean attribute (default: `false`)
    - ✨ `{{mdc-textfield}}` now has `box` boolean attribute (default: `false`)
- 🐛 `{{mdc-checkbox}}`, `{{mdc-radio}}`, and `{{mdc-switch}}` now respect checked attr (#29)
- 💚 Switch CI to use Headless Chrome (#28)
- ✨ Event bubbling can be disabled for checkboxes, radio buttons, and switches (#27)
@Kerrick Kerrick deleted the disable-event-bubbling branch October 12, 2017 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants