added behavior: if I click on an open panel that is not primary, it should make that panel primary