correctly detected nested list if text was clicked instead of li element.

Otherwise an empty list will be shown.