Fix edit behavior and add unit tests (!)

2 jobs for v2.3 in 2 minutes and 1 second (queued for 1 second)