fix(input-amount): set hint to use numeric on-screen keyboard (#689)
This commit is contained in:
parent
0a03119bc4
commit
02778c0daa
2 changed files with 6 additions and 0 deletions
|
|
@ -82,6 +82,7 @@ export class LionInputAmount extends LocalizeMixin(LionInput) {
|
|||
// eslint-disable-next-line wc/guard-super-call
|
||||
super.connectedCallback();
|
||||
this.type = 'text';
|
||||
this._inputNode.setAttribute('inputmode', 'decimal');
|
||||
|
||||
if (this.currency) {
|
||||
this.__setCurrencyDisplayLabel();
|
||||
|
|
|
|||
|
|
@ -64,6 +64,11 @@ describe('<lion-input-amount>', () => {
|
|||
expect(el.parser).to.equal(parseAmount);
|
||||
});
|
||||
|
||||
it('sets inputmode attribute to decimal', async () => {
|
||||
const el = await fixture(`<lion-input-amount></lion-input-amount>`);
|
||||
expect(el._inputNode.inputMode).to.equal('decimal');
|
||||
});
|
||||
|
||||
it('has type="text" to activate default keyboard on mobile with all necessary symbols', async () => {
|
||||
const el = await fixture(`<lion-input-amount></lion-input-amount>`);
|
||||
expect(el._inputNode.type).to.equal('text');
|
||||
|
|
|
|||
Loading…
Reference in a new issue