react-simple-keyboard returns TypeError for handleMaxLength

This issue has been tracked since 2022-05-09.

Simple-keyboard version
"react-simple-keyboard": "^3.1.17",
"simple-keyboard": "^3.1.15"

Describe the bug

Got and TypeError from Sentry.
The keyboard input limit is defined as constant:

export const TOUCH_KEYBOARD_INPUT_LIMITS = {
  orderNameInput: 25,
};

and the maxLength is defined as input attribute

<Input
                bordered={false}
                maxLength={TOUCH_KEYBOARD_INPUT_LIMITS.orderNameInput}
                onChange={(e) => {
                  setOrderName(e);
                  profanityError && setProfanityError('');
                }}
                placeholder="Your Order Name"
                value={orderName}
                align="center"
                id="orderNameInput"
              />

The error appeared after clicking some button but not sure, which:
ui.click div.hg-rows > div.hg-row
TypeError: Cannot read properties of undefined (reading 'length')

Errors appeared to come from here>
handleButtonClicked
handleMaxLength

Screenshots

image

hodgef wrote this answer on 2022-05-10

Hey @teetlaja, sadly I'm a bit forced to close this since I have no repro and therefore cannot debug. Not sure what else to say since maxLength does work in a sandbox and the types for it are very permissive. Let me know if you have a "debuggable" example of the issue and I will take a look.

Regards,
Francisco Hodge

More Details About Repo
Owner Name hodgef
Repo Name simple-keyboard
Full Name hodgef/simple-keyboard
Language JavaScript
Created Date 2018-03-02
Updated Date 2022-12-02
Star Count 1737
Watcher Count 20
Fork Count 130
Issue Count 0

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date