3 ms·
There are no hard and fast rules, only conventions that are context dependent. Buttons normally only respond to the “on click” event. This lets you move off th
by mbreese 2y ago
There are no hard and fast rules, only conventions that are context dependent.
Buttons normally only respond to the “on click” event. This lets you move off the button if you change your mind mid-click.
Window focus could be (I haven’t tested) an “on down” event because you might want to see what’s behind it while doing something else before you release the button (like drag it around). But focus used to be “on hover”, where just moving your mouse over a window brought it to the foreground. “On up” wouldn’t make sense because if you wanted to do something like move the window around, you couldn’t as you’ve now released the mouse.
It all depends on what you’re trying to do and the OS. Each OS has a design language that “tries” to bring some consistency to event handling. But ultimately, it’s up to the application to handle many things.