Disable or enable selection while changing tabs