Skip to content

Commit

Permalink
fix(input): remove click events from disabled inputs (#9676)
Browse files Browse the repository at this point in the history
fixes #9070
  • Loading branch information
jgw96 authored and adamdbradley committed Dec 19, 2016
1 parent 9b63d3e commit 21bd0a3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/input/input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ ion-textarea {
width: 100%;
}


.item-input ion-input,
.item-input ion-textarea {
position: static;
}


// Textarea Within An Item
// --------------------------------------------------

Expand Down Expand Up @@ -64,7 +64,6 @@ textarea.text-input {
opacity: .4;
}


input.text-input:-webkit-autofill {
background-color: transparent;
}
Expand All @@ -81,6 +80,7 @@ input.text-input:-webkit-autofill {
// This make it so the native input element is not clickable.
// This will only show when the scroll assist is configured
// otherwise the .input-cover will not be rendered at all
// The input cover is not clickable when the input is disabled

.input-cover {
position: absolute;
Expand All @@ -91,6 +91,10 @@ input.text-input:-webkit-autofill {
height: 100%;
}

ion-input[disabled] .input-cover {
pointer-events: none;
}


// Input Cover: Focused
// --------------------------------------------------
Expand Down
5 changes: 5 additions & 0 deletions src/components/input/test/input-focus/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,11 @@
<ion-input value="inline input 1"></ion-input>
</ion-item>

<ion-item>
<ion-label>Disabled Input:</ion-label>
<ion-input disabled value="disabled input 1"></ion-input>
</ion-item>

</ion-list>

</ion-content>

0 comments on commit 21bd0a3

Please sign in to comment.