Working on tab close and open via keypress