Skip to content

Commit

Permalink
fix: fix #input-password IE11/Edge clear button
Browse files Browse the repository at this point in the history
  • Loading branch information
tujoworker committed Nov 30, 2020
1 parent 54baea8 commit 75119dd
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2144,6 +2144,9 @@ legend.dnb-form-label {
.dnb-input--password .dnb-input__input {
margin-right: 2.5rem;
padding-right: 0; }
.dnb-input--password .dnb-input__placeholder::-ms-clear,
.dnb-input--password .dnb-input__input::-ms-clear {
display: none; }
.dnb-input--password .dnb-input__placeholder {
padding-right: 4rem; }
.dnb-input__row {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,9 @@ legend.dnb-form-label {
.dnb-input--password .dnb-input__input {
margin-right: 2.5rem;
padding-right: 0; }
.dnb-input--password .dnb-input__placeholder::-ms-clear,
.dnb-input--password .dnb-input__input::-ms-clear {
display: none; }
.dnb-input--password .dnb-input__placeholder {
padding-right: 4rem; }
.dnb-input__row {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1426,6 +1426,9 @@ legend.dnb-form-label {
.dnb-input--password .dnb-input__input {
margin-right: 2.5rem;
padding-right: 0; }
.dnb-input--password .dnb-input__placeholder::-ms-clear,
.dnb-input--password .dnb-input__input::-ms-clear {
display: none; }
.dnb-input--password .dnb-input__placeholder {
padding-right: 4rem; }
.dnb-input__row {
Expand Down
4 changes: 4 additions & 0 deletions packages/dnb-ui-lib/src/components/input/style/_input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@
&--password &__input {
margin-right: 2.5rem;
padding-right: 0;

&::-ms-clear {
display: none;
}
}
&--password &__placeholder {
padding-right: 4rem;
Expand Down
16 changes: 16 additions & 0 deletions packages/dnb-ui-lib/stories/components/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
FormRow,
FormLabel
} from '../../src/components'
import InputPassword from '../../src/components/input/InputPassword'

export default {
title: 'Eufemia/Components/Input'
Expand Down Expand Up @@ -292,6 +293,21 @@ export const InputSandbox = () => {
/>
</form>
</Box>
<Box>
<InputPassword
label="Label:"
placeholder="A palceholder text"
on_change={({ value }) => {
console.log('on_change:', value)
}}
on_show_password={() => {
console.log('on_show_password')
}}
on_hide_password={() => {
console.log('on_hide_password')
}}
/>
</Box>
</Wrapper>
</CustomStyle>
)
Expand Down

0 comments on commit 75119dd

Please sign in to comment.