Fix event issue on tab click

Use this in place of event.target