Skip to content

Commit eff79f0

Browse files
committed
fix(masked-input): Value not commited on auto-fill behavior
1 parent 08f89b4 commit eff79f0

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/components/date-picker/date-picker.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,6 @@ describe('Date picker', () => {
969969

970970
it('issue 1884 - should emit igcChange event in dialog mode after clearing the value and losing focus', async () => {
971971
const eventSpy = spy(picker, 'emitEvent');
972-
// const nativeInput = dateTimeInput.renderRoot.querySelector('input')!;
973972

974973
// Dropdown mode
975974

src/components/mask-input/mask-input-base.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,16 @@ export abstract class IgcMaskInputBaseComponent extends IgcInputBaseComponent {
116116
value.substring(this._inputSelection.start, this._inputSelection.end),
117117
{ ...this._inputSelection }
118118
);
119+
120+
// Potential browser auto-fill behavior
121+
case undefined:
122+
return this._updateInput(
123+
value.substring(start, this._inputSelection.end),
124+
{
125+
start,
126+
end: this._inputSelection.end,
127+
}
128+
);
119129
}
120130
}
121131

0 commit comments

Comments
 (0)