0

I have a simple Android app, which is a HTML5 canvas.

Upon loading, the app resizes the canvas to match the window.innerWidth and window.innerHeight.

However, for some reason when I hold my finger on the app and move it, i can slightly drag the whole canvas a pixel or two. Is there anyway to prevent the canvas from moving? I don't understand why it happens, the canvas should not be bigger than the window.

P.Henderson
  • 859
  • 2
  • 11
  • 23

1 Answers1

1

P.Henderson you will need to disable the scroll event listener I.E. disable the mouse wheel, try this answer or shrink your canvas by 1 pixel width and height

Community
  • 1
  • 1
Canvas
  • 5,343
  • 7
  • 48
  • 93