Defer callback after images are loaded in image review UIs.

Review Request #13545 — Created Feb. 16, 2024 and submitted

Information

Review Board
master

Reviewers

The callback that handles the initial sizing/scaling for images was
sometimes running before jquery finished setting the initial-width and
initial-height data, which could result in one of the two images in
the two-up view being scaled and one not. This change adds a _.defer
call to unwind the stack before we trigger that callback.

Loaded a diff that had a bunch of changed images with @2x versions. Saw
that I was no longer able to trigger the case where one out of the two
images was full size and one was 50%.

Summary ID
Defer callback after images are loaded in image review UIs.
The callback that handles the initial sizing/scaling for images was sometimes running before jquery finished setting the `initial-width` and `initial-height` data, which could result in one of the two images in the two-up view being scaled and one not. This change adds a `_.defer` call to unwind the stack before we trigger that callback. Testing Done: Loaded a diff that had a bunch of changed images with @2x versions. Saw that I was no longer able to trigger the case where one out of the two images was full size and one was 50%.
d7c7800799447f1a7e842a7b036784556330b4a8
chipx86
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-7.x (8c70c73)
Loading...