sokol_app.h html5: event bubbling followup fixes...
floooh opened this issue · comments
Andre Weissflog commented
The recent fix to simply let bubble mouse and touch events up to the web page has some undesirable side effects:
- #969
- on the standard samples, double- and triple-clicking into the canvas will select the overlay HTML text (e.g. https://floooh.github.io/sokol-html5/clear-sapp.html)
Related:
- #800
- #801
- comment in favour of this idea: - #822 (comment)
Solution: restore previous default behaviour (mouse, touch and maybe key input does not bubble up by default), and instead add the following config items to sapp_desc
:
html5_bubble_mouse_events
html5_bubble_wheel_events
html5_bubble_touch_events
html5_bubble_key_events
html5_bubble_char_events
...this would be a good opportunity (but a breaking change) to introduce nesting for those platform-specific config items, e.g. (still a good idea, but for a later time)
return (sapp_desc){
.win32 = {
...
},
.html5 = {
...
}
};
Andre Weissflog commented
Fixed via #975