Commit cf84423
Allow mode switching during initial FullPage capture
V3 previously locked all non-FullPage mode buttons until the screenshot
loop completed. V1 allowed switching during capture; restoring that UX.
Renderer:
- Drop the three mode-button disable loops (initial lock, switchToFullPage
re-entry, sign-out reset). Save + signout remain locked during capture.
- New abortCurrentCapture() centralizes the cancel teardown: sends
cancelCapture to worker, clears local progress UI, restores the
preview-frame overlay, resets stitchYOffset so the next session
starts clean.
- Click handler invokes abortCurrentCapture() when leaving FullPage
mid-capture (replacing the previous early-return that blocked the
switch entirely).
- switchToFullPage's re-entry path defers kickoffFullPageCapture
through a two-step requestAnimationFrame, with an explicit
iframe.contentWindow.scrollTo(0, 0) after a forced reflow. Two paint
frames is enough for the iframe to commit the display:none ->
display:block transition AND the scroll reset before the worker's
captureVisibleTab fires. Without this, captureVisibleTab grabs the
iframe at its prior scroll position and the new capture appears to
"continue where it left off".
- Finalize's UI cleanup guards on currentMode === "fullpage" so a
capture that completes while the user has already pivoted to another
mode doesn't force-enable the Save button or steal focus.
Worker:
- New cancelCapture action handler sets a captureCancelled flag scoped
to setupPort.
- Four async-resume points (the scrollResult setTimeout, the
windows.update callback, the captureVisibleTab callback, the
drawComplete handler) short-circuit on the flag.
- The dimensions handler resets the flag to false on every fresh
kickoff so the new session starts clean.
Aria intact (1x microsoft.applications.telemetry.LogManager in minified
target/chrome/logManager.js); npm run build:prod completes clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent f342370 commit cf84423
2 files changed
Lines changed: 50 additions & 35 deletions
Lines changed: 14 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
| 314 | + | |
| 315 | + | |
314 | 316 | | |
315 | 317 | | |
316 | 318 | | |
| |||
428 | 430 | | |
429 | 431 | | |
430 | 432 | | |
| 433 | + | |
431 | 434 | | |
432 | 435 | | |
433 | 436 | | |
| |||
445 | 448 | | |
446 | 449 | | |
447 | 450 | | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
448 | 455 | | |
449 | 456 | | |
450 | 457 | | |
451 | | - | |
| 458 | + | |
| 459 | + | |
452 | 460 | | |
| 461 | + | |
453 | 462 | | |
| 463 | + | |
454 | 464 | | |
455 | 465 | | |
456 | 466 | | |
| |||
472 | 482 | | |
473 | 483 | | |
474 | 484 | | |
475 | | - | |
476 | | - | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
477 | 488 | | |
478 | 489 | | |
479 | 490 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
897 | 897 | | |
898 | 898 | | |
899 | 899 | | |
900 | | - | |
901 | | - | |
902 | | - | |
903 | | - | |
904 | | - | |
905 | | - | |
906 | | - | |
907 | | - | |
| 900 | + | |
908 | 901 | | |
909 | 902 | | |
910 | 903 | | |
911 | 904 | | |
912 | 905 | | |
913 | 906 | | |
914 | 907 | | |
915 | | - | |
| 908 | + | |
916 | 909 | | |
917 | 910 | | |
918 | 911 | | |
| |||
1013 | 1006 | | |
1014 | 1007 | | |
1015 | 1008 | | |
1016 | | - | |
1017 | | - | |
1018 | | - | |
1019 | | - | |
1020 | | - | |
1021 | | - | |
1022 | 1009 | | |
1023 | 1010 | | |
1024 | 1011 | | |
1025 | 1012 | | |
1026 | | - | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
1027 | 1021 | | |
1028 | 1022 | | |
1029 | 1023 | | |
| |||
2389 | 2383 | | |
2390 | 2384 | | |
2391 | 2385 | | |
2392 | | - | |
2393 | | - | |
| 2386 | + | |
| 2387 | + | |
2394 | 2388 | | |
2395 | 2389 | | |
2396 | 2390 | | |
| |||
2436 | 2430 | | |
2437 | 2431 | | |
2438 | 2432 | | |
2439 | | - | |
2440 | 2433 | | |
2441 | 2434 | | |
2442 | 2435 | | |
| |||
2448 | 2441 | | |
2449 | 2442 | | |
2450 | 2443 | | |
| 2444 | + | |
| 2445 | + | |
| 2446 | + | |
| 2447 | + | |
| 2448 | + | |
| 2449 | + | |
| 2450 | + | |
| 2451 | + | |
| 2452 | + | |
| 2453 | + | |
| 2454 | + | |
| 2455 | + | |
2451 | 2456 | | |
2452 | 2457 | | |
2453 | 2458 | | |
| |||
2935 | 2940 | | |
2936 | 2941 | | |
2937 | 2942 | | |
2938 | | - | |
| 2943 | + | |
2939 | 2944 | | |
2940 | | - | |
2941 | | - | |
| 2945 | + | |
| 2946 | + | |
| 2947 | + | |
| 2948 | + | |
| 2949 | + | |
2942 | 2950 | | |
2943 | | - | |
2944 | | - | |
2945 | | - | |
2946 | | - | |
2947 | | - | |
2948 | 2951 | | |
2949 | 2952 | | |
2950 | 2953 | | |
2951 | 2954 | | |
2952 | | - | |
2953 | | - | |
| 2955 | + | |
| 2956 | + | |
| 2957 | + | |
| 2958 | + | |
| 2959 | + | |
2954 | 2960 | | |
2955 | 2961 | | |
2956 | 2962 | | |
| |||
3262 | 3268 | | |
3263 | 3269 | | |
3264 | 3270 | | |
3265 | | - | |
| 3271 | + | |
3266 | 3272 | | |
3267 | 3273 | | |
3268 | | - | |
3269 | | - | |
3270 | 3274 | | |
3271 | 3275 | | |
3272 | 3276 | | |
| |||
0 commit comments