SolidJSS
SolidJSโ€ข2y agoโ€ข
2 replies
CatNoir

Override component events

TLDR: I used onContextMenu in a lot of components. Is there anyway to override and apply custom logic to that event without changing much code?
<div onContextMenu={...}></div>

On Chrome Mobile, the onContextMenu event fires when you press and hold on an element. on Safari mobile, It doesn't work, so I have to apply custom logic. But currently I have a lot of components where I have already used onContextMenu. Is there anyway to apply custom logic to onContextMenu without changing much code?
Was this page helpful?