fix for determining the current tab study and adding the "x" button

Reviewer: Tiffany Go

Issues: GCP-8775