There is a problem clicking layered Graphics objects after using Deploy. For example, the code below works as intended with the Disk 'on top of' the Line. Click either object anywhere and EventHandler changes the color as expected.
disk :=
DynamicModule[
{col = Green},
EventHandler[
Dynamic[{col,
Disk[]}], {"MouseClicked" :> (col =
col /. {Red -> Green, Green -> Red})}]
];
rect :=
DynamicModule[
{col = Green},
EventHandler[
Dynamic[{col, Thick,
Line[{{0, 0}, {10, 1}}]}], {"MouseClicked" :> (col =
col /. {Red -> Green, Green -> Red})}]
];
Graphics[{ rect, disk}]
Now try this:
Deploy@Graphics[{ rect, disk}]
You will see that EventHandler now behaves as though the Line is on top of the Disk. Is there a workaround. We don't want the user to change / delete the graphic by mistake.