Fixed editor#elementPath method in case when no selection is available.