Closed Bug 2007555 Opened 8 months ago Closed 8 days ago

x.com - Pinch-to-zoom gesture barely zooms images

Categories

(Web Compatibility :: Site Reports, defect, P2)

ARM
Android

Tracking

(Webcompat Priority:P2, Webcompat Score:6)

RESOLVED FIXED
Webcompat Priority P2
Webcompat Score 6

People

(Reporter: ctanase, Unassigned)

References

()

Details

(Keywords: webcompat:platform-bug, webcompat:site-report, Whiteboard: [webcompat-source:web-bugs][webcompat:sightline][webcompat:japan][webcompat:core])

User Story

user-impact-score:300
platform:android
impact:annoyance
configuration:general
affects:all
branch:release
diagnosis-team:apz

Attachments

(1 file)

Environment:
Operating system: Android 16
Firefox version: Firefox Mobile 146.0/148

Preconditions:

  • must be logged in

Steps to reproduce:

  1. Go to https://x.com/
  2. Tap on an image.
  3. Try zooming in and out.

Expected Behavior:
The image is zoomed in and out correctly.

Actual Behavior:
Image barely gets zoomed in/out.

Notes:

  • Reproduces regardless of the status of ETP
  • Reproduces in firefox-nightly, and firefox-release
  • Does not reproduce in chrome

Created from https://github.com/webcompat/web-bugs/issues/196790

Attached video zoom FF vs Chrome.mp4
Whiteboard: [webcompat-source:web-bugs] → [webcompat-source:web-bugs][webcompat:sightline][webcompat:japan]
User Story: (updated)
Webcompat Score: --- → 1
Severity: -- → S4
User Story: (updated)
Webcompat Priority: --- → P2
Webcompat Score: 1 → 6
Priority: -- → P2
User Story: (updated)

I guess this is another sort of bug 1891595.

While pinch zooming in, I see the transform relevant styles on an element are being change, for example;

 <div class="css-175oi2r r-13awgt0" style="transform: scale(1); transform-origin: 269px 455px 0px;">

This is the element and while pinch-zooming in, the transfrom-origin is being changed, but the scale keep staying 1. It's very likely that the site fails to calculate the scale value properly.

User Story: (updated)
See Also: → 1891595

Now I am almost 100% sure the underlying problem is same as bug 1891595.

There's a similar code pattern on x.com, similar to the mastodon case in a function which gets called via a touchmove event listener

          this._lastDistance = c,
          this.setState({
            lastX: p.x,
            lastY: p.y,
            zoom: u,
            zoomCenter: m
          })

I dumped the lastDistance value and zoom's u value;

zoom: 0.8849417288623925, lastDistance: 409.9573148511928 bundle.TweetMediaDetail.7272608a.js:formatted:425:16
zoom: 1, lastDistance: 409.9573148511928 bundle.TweetMediaDetail.7272608a.js:formatted:425:16
zoom: 0.9271265916973205, lastDistance: 264.09278672466615 bundle.TweetMediaDetail.7272608a.js:formatted:425:16
zoom: 1, lastDistance: 264.09278672466615 bundle.TweetMediaDetail.7272608a.js:formatted:425:16
zoom: 0.996639273541688, lastDistance: 263.20524310887123 bundle.TweetMediaDetail.7272608a.js:formatted:425:16
zoom: 1, lastDistance: 263.20524310887123

You can see the same lastDistance value on each 2 lines, thus the zoom value is computed to 1.0 unfortunately.

Depends on: 1891595
See Also: 1891595
Depends on: 2018625
No longer depends on: 1891595
Whiteboard: [webcompat-source:web-bugs][webcompat:sightline][webcompat:japan] → [webcompat-source:web-bugs][webcompat:sightline][webcompat:japan][webcompat:core]

Can someone confirm that this issue has been resolved on latest Fenix nightlies?

This is working now on latest Fenix Nightly.

Thanks for the quick check!

Status: NEW → RESOLVED
Closed: 8 days ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: