Animation: Working on one element, but not with another

Hey there

I am designing a custom navbar that should allow a user to click outside it for the navbar to close. There is also a transparent background that should appear once the navbar is opened, and then disappear once it is closed.

Even though I use exactly the same animation for when someone clicks on the close button and background, when clicking on the background only the background disappears.

I’m not sure why this is the case, because both the close button and background use the same animation sequence when clicked on.

Here is the site:

A post was merged into an existing topic: Custom navbar issues