Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Number inputs throw an exception #24786

Closed
4 of 6 tasks
StefanNedelchev opened this issue Feb 15, 2022 · 4 comments
Closed
4 of 6 tasks

bug: Number inputs throw an exception #24786

StefanNedelchev opened this issue Feb 15, 2022 · 4 comments
Labels

Comments

@StefanNedelchev
Copy link

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x

Current Behavior

Changing the value (by user input) of an input of type number throws this exception:

DOMException: Failed to execute 'setSelectionRange' on 'HTMLInputElement': The input element's type ('number') does not support selection.
    at h.valueChanged (https://cdn.jsdelivr.net/npm/@ionic/core/dist/ionic/p-db2cac9b.entry.js:4:1924)
    at https://cdn.jsdelivr.net/npm/@ionic/core/dist/ionic/p-70d27bbc.js:4:11115
    at Array.map (<anonymous>)
    at https://cdn.jsdelivr.net/npm/@ionic/core/dist/ionic/p-70d27bbc.js:4:11098
    at h.set [as value] (https://cdn.jsdelivr.net/npm/@ionic/core/dist/ionic/p-70d27bbc.js:4:11166)
    at HTMLInputElement.onInput (https://cdn.jsdelivr.net/npm/@ionic/core/dist/ionic/p-db2cac9b.entry.js:4:841) 

Because of that, I can't handle form values anymore and they can't be submitted. I use Angular but I think the issue is not related to UI framework since I see it on the UI components page demo.

Expected Behavior

An exception should not be thrown and the value change should be handled.

Steps to Reproduce

  1. Open an ionic app that uses an input of type number (the official input demo has one)
  2. Change the value of a number input by either typing in a value or using the spin buttons

Code Reproduction URL

https://ionicframework.com/docs/api/input

Ionic Info

Ionic:

Ionic CLI : 6.18.1 (/usr/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 6.0.7
@angular-devkit/build-angular : 13.2.3
@angular-devkit/schematics : 13.2.3
@angular/cli : 13.2.3
@ionic/angular-toolkit : 6.0.0

Capacitor:

Capacitor CLI : 3.4.1
@capacitor/android : not installed
@capacitor/core : 3.4.1
@capacitor/ios : not installed

Utility:

cordova-res : not installed globally
native-run : 1.5.0

System:

NodeJS : v16.14.0 (/usr/bin/node)
npm : 6.14.16
OS : Linux 5.13

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Feb 15, 2022
@indraraj26
Copy link

duplicate #24753

6.0.8 will be released on tomorrow. You can try with dev build for now which is in above link.

@liamdebeasi
Copy link
Contributor

Thanks for the issue. I am going to close this as a duplicate of #24753.

@ionitron-bot
Copy link

ionitron-bot bot commented Mar 17, 2022

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

1 similar comment
@ionitron-bot
Copy link

ionitron-bot bot commented Apr 16, 2022

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Apr 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants