Open Bug 1638315 Opened 1 year ago Updated 1 year ago

Add a zoom "stop" at the initial zoom when zooming out is allowed on desktop


(Core :: Panning and Zooming, enhancement, P3)





(Reporter: kats, Unassigned)


(Blocks 2 open bugs)


In bug 1627010 we disallowed users to zoom out past the initial zoom on desktop. (That functionality is still available but behind a pref). The reason for that was that it's hard for the user to get back to the "initial zoom" which can be a bit disconcerting.

However, there's another option that's worth exploring, which is adding a zoom "stop" or "barrier" at the initial zoom. So if the user is zoomed out past initial zoom and they zoom in, the allowed zoom will get clamped at the initial zoom, and they will need to lift their fingers and begin another pinch gesture to continue zooming past that.

In terms of implementation I was thinking we can modify the ZoomConstraints object to hold a list of sorted zoom stops, with the first and last being the min and max allowed zoom. And then we could put any number of zoom stops in between. When the user starts a pinch gesture, APZ would check which zoom stops the pinch falls between and allow zooming within that range. If the gesture starts when the zoom is exactly (fuzzily) at a stop then it would allow zooming within the surrounding two ranges. This sort of generic implementation might allow us to eventually make this a specced web-platform feature where content authors can explicitly provide additional zoom stop values, but that's very much out of scope of this bug.

See Also: → 1650596
Blocks: 1654011
You need to log in before you can comment on or make changes to this bug.