Skip to content

bug: maxlength attribute not working with text using device keypad #26463

Closed
@sunaina-kapadne

Description

@sunaina-kapadne

Prerequisites

Ionic Framework Version

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

Current Behavior

  • When using maxlength attribute on Laptop/PC keyboard it works as per the expectations, but on the device keypad, the characters are exceeding maxlength attribute.
  • Numbers are working as per the expectations with max length attribute even on device keypad, unlike text.
  • Test Case: By default maxlength value is 5 characters
  • Please find below recording for your reference.
demoApp.mp4

Expected Behavior

maxlength attribute should work with Text characters as per the expectations on device keypad.

Steps to Reproduce

Android:
Use ion-text area and generate the app using cordova
click on the textarea field on the page to open device keypad
Enter any text exceeding 5 characters from keypad and the value is being accepted exceeding the max length value.

Code Reproduction URL

https://github.com/sunaina1691/demoApp.git

Ionic Info

Ionic:

Ionic CLI : 6.20.4 (C:\Users\skapadne\AppData\Roaming\npm\node_modules@ionic\cli)
Ionic Framework : @ionic/angular 6.4.0
@angular-devkit/build-angular : 15.0.3
@angular-devkit/schematics : 15.0.3
@angular/cli : 15.0.3
@ionic/angular-toolkit : 6.1.0

Cordova:

Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 9.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 3 other plugins)

Utility:

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

System:

Android SDK Tools : 26.1.1 (C:\Users\skapadne\AppData\Local\Android\Sdk)
NodeJS : v19.2.0 (C:\Program Files\nodejs\node.exe)
npm : 8.19.3
OS : Windows 10

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug: externalBugs in non-Ionic software that impact Ionic apps (I.e. WebKit, Angular, Android etc)ionitron: stale issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions