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

fix(input): set cursor to not-allowed when disabled #101

Merged
merged 2 commits into from
Jul 19, 2023
Merged
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ input {
}
}

[disabled] {
@include osds-input-on-selected-host() {
opacity: .5;
cursor: not-allowed;
}

cursor: not-allowed;
}

/* Chrome, Safari, Edge, Opera */
input[type=number],
input[type=number]::-webkit-outer-spin-button,
Expand All @@ -49,14 +58,6 @@ input[type=number]::-webkit-inner-spin-button {
margin: 0;
}

[disabled] {
@include osds-input-on-selected-host() {
opacity: .5;
cursor: not-allowed;
pointer-events: none;
Copy link
Contributor

@dpellier dpellier Jul 18, 2023

Choose a reason for hiding this comment

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

is this what has been asked for? cause this now allows user to select content on disabled input which was not doable before

Copy link
Contributor Author

Choose a reason for hiding this comment

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

goal was to display cursor as not allowed but not be able to interact with the input (which is enabled by the native disabled attribute of it)

}
}

// apply the theme template for the component
@include ods-theme-component() {
@include osds-input-theme-color();
Expand Down