added final functionality for openContextMenu and openTab from context menu