mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(input): remove click events from disabled inputs (#9676)
fixes #9070
This commit is contained in:
committed by
Brandy Carney
parent
877fcf178d
commit
22ba043c53
@@ -23,12 +23,12 @@ ion-textarea {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
.item-input ion-input,
|
||||
.item-input ion-textarea {
|
||||
position: static;
|
||||
}
|
||||
|
||||
|
||||
// Textarea Within An Item
|
||||
// --------------------------------------------------
|
||||
|
||||
@@ -64,7 +64,6 @@ textarea.text-input {
|
||||
opacity: .4;
|
||||
}
|
||||
|
||||
|
||||
input.text-input:-webkit-autofill {
|
||||
background-color: transparent;
|
||||
}
|
||||
@@ -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;
|
||||
@@ -91,6 +91,10 @@ input.text-input:-webkit-autofill {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
ion-input[disabled] .input-cover {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
|
||||
// Input Cover: Focused
|
||||
// --------------------------------------------------
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user