0

We are putting editable text on a canvas. When I add a lot of characters beyond the width of the canvas, the canvas wants to scroll. I want to prevent that scroll.

I think I want to capture the scroll with an event, and call preventDefault, or something. We never want the canvas to scroll.

I cannot set the overflow property of the canvas to 'none', it needs to remain hidden so that elements that are off the canvas are hidden.

How can I capture this horizontal scroll event? Thanks

dt1000
  • 3,684
  • 6
  • 43
  • 65

1 Answers1

1

the canvas element itself cannot scroll!!!!

i think you put the complete canvas into a div which can be scrolled. so you have to cancel Defaults on that div