Foliotek / Croppie

A Javascript Image Cropper
http://foliotek.github.io/Croppie
MIT License
2.56k stars 885 forks source link

[BUG] Zooming via Scroll, slightly scrolls the Page in Firefox on MacOS #706

Open maxeckel opened 4 years ago

maxeckel commented 4 years ago

Expected Behavior

When zooming via scroll the Page should stay at the same scroll position, while the Image gets zoomed in and out.

Actual Behavior

When trying to zoom the image via scroll in Firefox the Page always slightly scrolls up and down.

Steps to Reproduce the Problem

  1. Open http://foliotek.github.io/Croppie/#documentation in Firefox on MacOS
  2. Go to "Basic Example"
  3. Try to zoom via scrolling

Example Link

Specifications

Axel-Jacobsen commented 2 years ago

I am still getting this :(

Any work-arounds?

Axel-Jacobsen commented 2 years ago

OK I am digging in.

While holding down 'ctrl' and scrolling, the modal scrolls as desired.

I am staring at this block of code, which I am guessing is where the bug is living: https://github.com/Foliotek/Croppie/blob/8998b1e35a79f5c8f920e7fa76f72523bffc8df5/croppie.js#L638-L658

EDIT: This is probably due to firefox's behavior of zooming the entire page when holding ctrl and zooming (that is; by default, firefox disables page scrolling while holding control and zooming in-and-out). Maybe this is bigger than Croppie, and a firefox issue? TBH i think I may just use cropper.js, it seems like there is more support/it is more up-to-date than this project.