Fixed bug when switching between panels by stopping event bubbling after handling.