Description
There is one situation in Terminal.Gui
which make me crazy. A simple Accepting
event which will allow the developer to Cancel
the default behavior (but has the Handled
property) will repeat the event 3 times by mouse if the developer doesn't Cancel it. UICatalog
has a bunch of Button
's that if they are activated by mouse will repeat the event 3 times, no matter the user press Key.Enter
or Key.Esc
. Despite by adding Handled = true
fix this, there is no necessity of this extra code for a normal Accepting
event. We can't handle mouse event as key event because only the only the view where the mouse is will be executed and doesn't not propagate to other views and with key event it can be propagate to other views that may want to handle it. I agree the leverage of keybindings, commands and context to achieve this behavior but we need to handle the mouse with much more careful.
Originally posted by @BDisp in #4126 (comment)
I understand that the current implementation is correct to handle adornments and all the views under the mouse but the Button
must be responsible to set e.Handled = true;
after the MouseClick
event. to prevent further processing to itself.
Metadata
Metadata
Assignees
Type
Projects
Status