Skip to content

Commit

Permalink
fix: do not set step buttons opacity when field is disabled (#7775) (#…
Browse files Browse the repository at this point in the history
…7788)

Co-authored-by: Serhii Kulykov <iamkulykov@gmail.com>
  • Loading branch information
vaadin-bot and web-padawan committed Sep 10, 2024
1 parent 862a104 commit 91bc69d
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 2 deletions.
13 changes: 13 additions & 0 deletions packages/number-field/test/visual/lumo/number-field.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,19 @@ describe('number-field', () => {
await visualDiff(div, `${dir}-step-buttons-visible`);
});

it('step buttons visible disabled', async () => {
element.stepButtonsVisible = true;
element.disabled = true;
await visualDiff(div, `${dir}-step-buttons-visible-disabled`);
});

it('step buttons visible disabled value', async () => {
element.stepButtonsVisible = true;
element.value = 1;
element.disabled = true;
await visualDiff(div, `${dir}-step-buttons-visible-disabled-value`);
});

it('align-right', async () => {
element.value = 10;
element.setAttribute('theme', 'align-right');
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions packages/number-field/test/visual/material/number-field.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,19 @@ describe('number-field', () => {
element.value = 5;
await visualDiff(div, `${dir}-step-buttons-visible`);
});

it('step buttons visible disabled', async () => {
element.stepButtonsVisible = true;
element.disabled = true;
await visualDiff(div, `${dir}-step-buttons-visible-disabled`);
});

it('step buttons visible disabled value', async () => {
element.stepButtonsVisible = true;
element.value = 1;
element.disabled = true;
await visualDiff(div, `${dir}-step-buttons-visible-disabled-value`);
});
});
});
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const numberField = css`
text-align: center;
}
[part$='button'][disabled] {
:host(:not([disabled])) [part$='button'][disabled] {
opacity: 0.2;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const numberField = css`
text-align: center;
}
[part$='button'][disabled] {
:host(:not([disabled])) [part$='button'][disabled] {
opacity: 0.2;
}
Expand Down

0 comments on commit 91bc69d

Please sign in to comment.