All of my logins have a custom column named "Group". The list of logins is grouped by "Group". If I open a group with (+) and then perform an action such as delete or update on an entry in the group, the focus then randomly moves to some other group. I would expect the focus to stay within that group if there is at least 1 entry in it.
Your fix works great if only 1 row is deleted from a group. If more than one row is selected and then deleted, the focus jumps to another random group.
Yeah, I see that - it's kinda hit or miss, but seems to happen more often when there is only one connection left in a group. I'll take another look at it.