diff --git a/packages/input-amount/src/LionInputAmount.js b/packages/input-amount/src/LionInputAmount.js index 98b5f58c5..100f94a93 100644 --- a/packages/input-amount/src/LionInputAmount.js +++ b/packages/input-amount/src/LionInputAmount.js @@ -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(); diff --git a/packages/input-amount/test/lion-input-amount.test.js b/packages/input-amount/test/lion-input-amount.test.js index fd881a39e..197b06f03 100644 --- a/packages/input-amount/test/lion-input-amount.test.js +++ b/packages/input-amount/test/lion-input-amount.test.js @@ -64,6 +64,11 @@ describe('', () => { expect(el.parser).to.equal(parseAmount); }); + it('sets inputmode attribute to decimal', async () => { + const el = await fixture(``); + 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(``); expect(el._inputNode.type).to.equal('text');