In a different discussion, it was mentioned that the method used to create a CSS triangle allows for triggering the hover state or click event only when the cursor is inside the triangle. There is a demo provided to demonstrate this with the hover state.
Here is the issue I am facing:
https://i.sstatic.net/zYIS7.png
I do not want the user to be able to click in that specific area and inadvertently trigger my onclick function, which causes the triangle to disappear. While I have found solutions for hover and active states, I am struggling with implementing a click event. How can I ensure that the function is only called when the user clicks inside the triangle, resulting in the triangle disappearing when executed with:
style.visibility = "hidden";
Any assistance on this matter would be greatly valued.