Skip to content

Commit ae86ab8

Browse files
committed
fix(input): allow button click when input has focus
only show clear input button when input has focus. closes #6514 and closes #6944
1 parent 4479a01 commit ae86ab8

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/components/input/input.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@ input.text-input:-webkit-autofill {
9696
}
9797

9898
.input-has-focus input,
99-
.input-has-focus textarea {
99+
.input-has-focus textarea,
100+
.input-has-focus a,
101+
.input-has-focus button {
100102
pointer-events: auto;
101103
}
102104

@@ -136,7 +138,7 @@ input.text-input:-webkit-autofill {
136138
background-position: center;
137139
}
138140

139-
.input-has-value .text-input-clear-icon {
141+
.input-has-focus.input-has-value .text-input-clear-icon {
140142
display: block;
141143
}
142144

src/components/input/test/clear-input/main.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
<button item-right (click)="clicked()">Button</button>
2323
</ion-item>
2424

25+
<ion-item>
26+
<input type="text" placeholder="Native Input"/>
27+
<button item-right (click)="clicked()">Button</button>
28+
</ion-item>
2529
</ion-list>
2630

2731
</ion-content>

0 commit comments

Comments
 (0)