Let's say there's a button (button1) and there's a panel above it, and there're two buttons in this panel where one button (button3) is above the other one (button2). When I click button3, everything's ok, only button3 will response to the mouse input. But when I click the overlap part of button1 and button2, both buttons will receive the input and be clicked.
I think this is because a container's (in this case, the grid's) input processing loop only breaks when the input can't FallsThrough a child widget, but does not consider whether the input has been handled or not. Perhaps adding a return value to the method OnTouchDown and other input handlers to indicate whether the input has been handled can fix this problem. For example:
var doBreak = (w.Desktop != null && !w.FallsThrough(w.Desktop.TouchPosition));
var inputHandled = w.OnTouchDown();
if (doBreak || inputHandled)
break;
Let's say there's a button (button1) and there's a panel above it, and there're two buttons in this panel where one button (button3) is above the other one (button2). When I click button3, everything's ok, only button3 will response to the mouse input. But when I click the overlap part of button1 and button2, both buttons will receive the input and be clicked.
The layout code is shown below.
I think this is because a container's (in this case, the grid's) input processing loop only breaks when the input can't
FallsThrough
a child widget, but does not consider whether the input has been handled or not. Perhaps adding a return value to the methodOnTouchDown
and other input handlers to indicate whether the input has been handled can fix this problem. For example: