I already asked a almost similar question here: Three.js prevent Raycast through Gui
This worked:
$( gui.domElement ).mouseenter(function(evt) {
enableRaycasting = false;
} );
$( gui.domElement ).mouseleave(function() {
enableRaycasting = true;
} );
but there's a problem stil appearing: There is a combobox in my dat.gui which has some items in it. When the box has less then 6 elements, everything is fine, but if it has more then 5 elements in it, it sticks out of the gui (because the gui is in an upper corner) and goes into the raycasted scene. Then i can't select the item in the box anymore and raycast is enabled. How can i prevent the raycast, when an item of the combobox is out of the area of the gui.domElement?
EDIT: Sometimes its even working and sometimes not. It depends whether the gui is clicked before and on the focus somehow, i don't know exactly..