After you delete some lines, you have to press "OK" to confirm that, but when you do so it opens "Edit" window for the next line which gets auto selected.
Suggestion: Add "Edit" button and make "OK" do what you expect from it, i.e. confirm and exit.
Admittedly, this dialogue needs to be revised. For now, I'm going to do it so that after any deletion the OK button just makes it OK and doesn't go into edit mode.