Focus on canvas touch events when other elements can be found on top of it

Seems that i have been loosing focus on canvas touch events when other elements (such as divs with visible content) can be found on top of it… is there a way to ‘bubble’ up the canvas touch events above all over elements that are on top of it in the html hierarchy?

Yes sure, you can do it with CSS. Set the pointer-events style property to none on any element that you don’t want to catch input events.

The input events will automatically be propagated to any element behind it.

1 Like