EXOGTN-1357: Fix js for displaying tooltip in case of having nested container