debois / elm-mdl

Elm-port of the Material Design Lite CSS/JS library
Apache License 2.0
965 stars 133 forks source link

Force chips to span tag when they contains actions #349

Closed alvivi closed 7 years ago

alvivi commented 7 years ago

HTML buttons can only contain phrasing elements. Some browsers (like Firefox) does not support interactive elements inside a button. This commit force chips to use a span element when they contain an action, even when they are rendered to a button.

Fix #332.

alvivi commented 7 years ago

Just for reference: https://html.spec.whatwg.org/multipage/form-elements.html#the-button-element

The mdl documentation is confusing. The last example is wrong, but the deletable chip that works in Firefox is actually a span.

aforemny commented 7 years ago

Merged it manually into v9. Thanks a bunch! :)

alvivi commented 7 years ago

@aforemny should I start future pull requests on v9 branch even their issue is targeted to v8?

aforemny commented 7 years ago

@alvivi Please open them on v9.