Close New Rule dropdown on inline editor close or editor resize

This is for #6005