UI Image not blocking raycast

I just upgraded to Unity 5.2.1p4 and I am having some issues with the UI.

My parent object has an image, a button and its child object has an image. When I click on the child object, it doesn’t block the Raycast and the parent button (behind it) gets the click. I thought Images are supposed to block Raycasts. I even tried using a Canvas Group and setting its “Block Raycasts” to true, with no success.

The only way I found to prevent the raycast propagation was adding an empty, non-interactable button to the child object, which I think is too much.

Am I missing something or did something change on the last updates?

EDIT: There is an example project (about 30Kb): Zippyshare.com - [now defunct] Free File Hosting
Clicking on the black square triggers the white button. The only way to make the black square blocking the raycast is by adding an empty button to it.

If I’m not mistaken, There’s a Raycast Target checkbox in Image. Try unchecking that box in the parent Image to avoid blocking the raycasts, since that one is probably first to get raycasted as you navigate to the children in the view.

Looking at your project it appears that by default UI elements are non-interactable. This is why a button appears to fool it.

Try adding “UI->Selectable” to your Child object and setting it to not react on click. This makes it block just fine.

EDIT: It seems there are multiple things that should perform this task and many things that suggest that what you observe is default behaviour.

Take this for example:

and this

http://docs.unity3d.com/ScriptReference/UI.MaskableGraphic.html

Both of which suggest that blocking a raycast is a scripted affair.

and if the problem occurs in a button ?
I have a click walk script and it is stupidly activated every time a UI button is clicked, the only way I found was to deactivate and activate the script, inside the button script… which is stupid, the problem is that now I have a visual element (scoreboard with scroll) that does not have an on-click script, making it impossible for me to use my solution…