Update selection upon frame open
Improve frame open/close handling