BoxControl: Attempts to access released event in onChange from drag gesture #30073
Labels
[Feature] Inspector Controls
The interface showing block settings and the controls available for each block
[Type] Bug
An existing feature does not function as intended
Description
When using a mouse drag gesture on the
UnitControl
s within aBoxControl
errors are thrown regarding an attempt to access properties on a released synthetic event. In this case, it is attempting to check whether the alt key is pressed.The alt key is used to be able to synchronize changes to the corresponding side e.g. top > bottom, left > right etc.
Step-by-step reproduction instructions
Expected behaviour
There would be no errors when using a drag gesture to edit the box control fields.
Actual behaviour
Errors are thrown.
Screenshots or screen recording (optional)
Possible Solution
One possible solution is to add
event.persist()
when collecting thedragProps
in theInputField
component.There no doubt would be performance implications in doing this so perhaps there is a better option. Cloning the desired event props into the
dragProps
wouldn't align with the event from using the keyboard with the alt key pressed.An example using the
event.persist()
approach can be found here: 2d8eb63WordPress information
Device information
The text was updated successfully, but these errors were encountered: