Changing child triggers parent collider OnMouseExit

As the subject says, I have a situation where changes to child objects randomly trigger OnMouseExit on the parent object’s BoxCollider.

I have a simple listbox prefab that consists of a parent GameObject with a BoxCollider, and some child objects representing each line in the listbox – simple quads that swap textures depending on whether the mouse is hovered over each line. It uses OnMouseOver to apply the regular or highlighted texture when the mouse position moves over a different line. It also uses OnMouseExit to remove the highlight if the mouse leaves the listbox area. Nothing complicated about it.

There is a clear space (still inside the collider) to the right of the list items where I will add a scrollbar later. When I move the mouse up and down in that clear space, the highlights turn on and off smoothly, and OnMouseExit only triggers when I actually exit the collider.

However, if I move the mouse up and down over the list-item child objects, OnMouseExit fires at random when I change the material of the child quad, then OnMouseOver fires again, but not consistently. The result is a bad flickering effect, or simply applying the regular texture instead of the highlighted texture when the mouse is over a line.

During quick-and-dirty prototyping I was using SetActive to show/hide separate child quads rather than swapping materials and that caused the same problem. At present there is no other code involving the prefab except this mouseover highlight tracking.

I haven’t been able to find anything which describes this specific problem. Is there an explanation and a solution?

Bah, somehow the Z scale of the collider had been set to zero … changing it to 1 restores the expected behavior.