Site logo

Archived topic

Uncaught TypeError: this.closest is not a function

8 replies · Started by Enrico on December 10, 2017

Viewing posts 1–9 of 9

I found this error on first click on the menu's items.

Uncaught TypeError: this.closest is not a function at VM27 dropdown.min.js:1

For each menu's items I have one error the first time I enter in the page. The only difference is the WMxx number. If I click the same item on the menu the second time there is no error.

I see the errors with Chrome's Developer Tool. To see again the error I have to clean the cache.

I don't have this error only on one site with Wordpress in english. On all the sites with Wordpress in Italian I always have this error the first click.

The site I linked, to show you the problem, is in italian and you can also go to the english version that is immune.

I disable several plugin to see if it was a conflict but it was not.

Hi there,

I'm unable to get the error to show?

Have you fixed this?

If not can you provide a more specific instruction on how to trigger it?

Hi Leo,
I checked again now on the italian site I gave you, the error is still alive :-) On the english version of the site there is no error.

1) Check if the menu is in italian, if not from the menu change to the italian site.
2) Clean the browser cache. Open Chrome Developer tool (I tested with crome 63 and 65)
3) On console panel check the mark on Preserve log.
4) Click on the menu to change pages.

If you don't log the error you see only a little delay before it goes to the page.

I found one of my site in italian that is also immune. So the language is not the key.

Here's what I'm seeing: https://www.screencast.com/t/c5kO1qZ4vN

Am I doing something wrong?

closest() is a native javascript function that should work fine in Chrome. Language itself shouldn't matter at all.

Hi Tom,
the only difference I see is that you use the desktop view in the Debug console and I simulate a mobile view.

I simulated an iPad pro on the debug consol and it is immue since it is a desktop view.
So probably the problem is only on mobile.

See it here https://www.useloom.com/share/2551f7219fce4282b3c997a9f6a666f5 to see the problem on my side.

Confirmed and fixed in 2.0.1. Thank you! :)

2.0.1 was just released.

Thanks!

Tested and no more errors.
Thanks a lot Tom!

Thank you for reporting! :)

This archived topic is closed to new replies.