Skip to content

[5.x]: Edit Update Levels Modal triggers on keypress; lag causes typing a multi digit number to be incorrectly input #3920

Open
@eeeeeeeeeve

Description

@eeeeeeeeeve

What happened?

Description

When setting inventory on a variant, if typing speed is not quick enough the Inventory Levels modal updates post the value, then updates the field after it has been posted, setting the cursor back to the beginning. Depending on typing speed, this can result in the value ending up as 312 when intending to type 123, or not registering some keypresses at all.

Steps to reproduce

  1. Attempt to update inventory levels via modal - enter 123456789 slowly-ish

Expected behavior

Field should say 123456789

Actual behavior

Field value gets jumbled

Craft CMS version

5.6.6

Craft Commerce version

5.3.2.2

PHP version

8.3

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions