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

Adds disabled="true" to force your render separate from other attributes | Fixes #522 #561

Merged
merged 4 commits into from
Feb 15, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/clay-button/src/ClayButton.soy
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
{/if}

{if $disabled}
disabled
disabled="true"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to disabled docs this should be disabled="disabled".

Source: https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/disabled

Thx!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes more sense now. Thanks @carloslancha.

{/if}

{if $id}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ exports[`ClayButton should render a button with label and icon on right side 1`]

exports[`ClayButton should render a button with name 1`] = `<button class="btn btn-primary" name="myButton" type="button"></button>`;

exports[`ClayButton should render a disabled button 1`] = `<button class="btn btn-primary" disabled="" type="button"></button>`;
exports[`ClayButton should render a disabled button 1`] = `<button class="btn btn-primary" disabled="true" type="button"></button>`;

exports[`ClayButton should render a reset button 1`] = `<button class="btn btn-primary" type="reset"></button>`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ exports[`ClayManagementToolbar should render a disabled management toolbar 1`] =
</div>
</li>
<li class="nav-item">
<button class="btn nav-link nav-link-monospaced order-arrow-up-active btn-unstyled" aria-label="order-arrow" disabled="" type="button">
<button class="btn nav-link nav-link-monospaced order-arrow-up-active btn-unstyled" aria-label="order-arrow" disabled="true" type="button">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-order-arrow">
<title>order-arrow</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#order-arrow"></use>
Expand All @@ -46,7 +46,7 @@ exports[`ClayManagementToolbar should render a disabled management toolbar 1`] =
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#times"></use>
</svg>
</button>
<button class="btn navbar-breakpoint-d-block btn-unstyled" aria-label="search" disabled="" type="submit">
<button class="btn navbar-breakpoint-d-block btn-unstyled" aria-label="search" disabled="true" type="submit">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-search">
<title>search</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#search"></use>
Expand All @@ -60,7 +60,7 @@ exports[`ClayManagementToolbar should render a disabled management toolbar 1`] =
</div>
<ul class="navbar-nav">
<li class="nav-item navbar-breakpoint-d-none">
<button class="btn nav-link nav-link-monospaced btn-unstyled" aria-label="search" disabled="" type="button">
<button class="btn nav-link nav-link-monospaced btn-unstyled" aria-label="search" disabled="true" type="button">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-search">
<title>search</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#search"></use>
Expand Down