SleipnirGroup / Choreo

A graphical tool for planning time-optimized trajectories for autonomous mobile robots in the FIRST Robotics Competition.
BSD 3-Clause "New" or "Revised" License
150 stars 46 forks source link

Undo in expression inputs disregards values being set #921

Open shueja opened 1 week ago

shueja commented 1 week ago

Reproduce: Add a waypoint Click into the waypoint X input, which will have some long decimal number like 6.321791648864746 m Select all, delete Type "8m", press Enter. This will not be accepted as-is, but the app will write a modified version 8 m into the input. Click back into the input, press ctrl-Z. See the input contents as 8 m6.321791648864746 m (with all but 8 m selected)

Notes: This does not happen if the delete button is skipped (i.e. typing directly over the selection).

Another variant of the same bug:

Reproduce: Add a waypoint Click into the waypoint X input, which will have some long decimal number like 6.321791648864746 m Select all, delete Press Enter with the input still empty. This will make JavaScript restore the original number Click back into the input, press ctrl-Z. See the input contents as 6.321791648864746 m6.321791648864746 m with the latter copy selected.