From rack of box objects, able to select object using raycaster. Displaying modal window on click of rack object. Problem is in the modal window on click event triggers underlying scene click event. Please inform is there any way to stop it. Already checked z-index. For modal z-index 1050 and for canvas div -1.
Depending on how your HTML is structured, you can fix this by calling event.stopPropagation()
. Check out how in the following fiddle the first event listener is not called since the event listener for the canvas calls the mentioned method.
https://jsfiddle.net/reLptybm/
Notice that this only works since the canvas element is lower in the DOM hierarchy.
Thank you very much.