@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Restore lightbox behavior for thumbnailed images

Summary: Ref T13099. See <https://discourse.phabricator-community.org/t/lightbox-not-working/1201>. The Content-Security-Policy changes rewrote some of this code and the handling for "Download" links is incorrectly catching clicks on thumbnailed images.

Test Plan: Clicked a thumbnailed image, got a lightbox. Command-clicked a download link, still got link behavior instead of a lightbox.

Maniphest Tasks: T13099

Differential Revision: https://secure.phabricator.com/D19188

+15 -14
+12 -12
resources/celerity/map.php
··· 10 10 'conpherence.pkg.css' => 'e68cf1fa', 11 11 'conpherence.pkg.js' => '15191c65', 12 12 'core.pkg.css' => '2fa91e14', 13 - 'core.pkg.js' => 'a3ceffdb', 13 + 'core.pkg.js' => 'e4d73c62', 14 14 'darkconsole.pkg.js' => '1f9a31bc', 15 15 'differential.pkg.css' => '113e692c', 16 16 'differential.pkg.js' => 'f6d809c0', ··· 494 494 'rsrc/js/core/behavior-hovercard.js' => 'bcaccd64', 495 495 'rsrc/js/core/behavior-keyboard-pager.js' => 'a8da01f0', 496 496 'rsrc/js/core/behavior-keyboard-shortcuts.js' => '01fca1f0', 497 - 'rsrc/js/core/behavior-lightbox-attachments.js' => 'e31fad01', 497 + 'rsrc/js/core/behavior-lightbox-attachments.js' => '562bcce0', 498 498 'rsrc/js/core/behavior-line-linker.js' => 'a9b946f8', 499 499 'rsrc/js/core/behavior-more.js' => 'a80d0378', 500 500 'rsrc/js/core/behavior-object-selector.js' => '77c1f0b0', ··· 643 643 'javelin-behavior-history-install' => '7ee2b591', 644 644 'javelin-behavior-icon-composer' => '8499b6ab', 645 645 'javelin-behavior-launch-icon-composer' => '48086888', 646 - 'javelin-behavior-lightbox-attachments' => 'e31fad01', 646 + 'javelin-behavior-lightbox-attachments' => '562bcce0', 647 647 'javelin-behavior-line-chart' => 'e4232876', 648 648 'javelin-behavior-load-blame' => '42126667', 649 649 'javelin-behavior-maniphest-batch-selector' => 'ad54037e', ··· 1362 1362 'javelin-vector', 1363 1363 'javelin-dom', 1364 1364 ), 1365 + '562bcce0' => array( 1366 + 'javelin-behavior', 1367 + 'javelin-stratcom', 1368 + 'javelin-dom', 1369 + 'javelin-mask', 1370 + 'javelin-util', 1371 + 'phuix-icon-view', 1372 + 'phabricator-busy', 1373 + ), 1365 1374 '58dea2fa' => array( 1366 1375 'javelin-install', 1367 1376 'javelin-util', ··· 2066 2075 'javelin-workflow', 2067 2076 'javelin-dom', 2068 2077 'phabricator-draggable-list', 2069 - ), 2070 - 'e31fad01' => array( 2071 - 'javelin-behavior', 2072 - 'javelin-stratcom', 2073 - 'javelin-dom', 2074 - 'javelin-mask', 2075 - 'javelin-util', 2076 - 'phuix-icon-view', 2077 - 'phabricator-busy', 2078 2078 ), 2079 2079 'e379b58e' => array( 2080 2080 'javelin-behavior',
+3 -2
webroot/rsrc/js/core/behavior-lightbox-attachments.js
··· 48 48 } 49 49 50 50 // If you click the "Download" link inside an embedded file element, 51 - // don't lightbox the file. 52 - if (e.getNode('tag:a')) { 51 + // don't lightbox the file. But do lightbox when the user clicks an 52 + // "<img />" inside an "<a />". 53 + if (e.getNode('tag:a') && !e.getNode('tag:img')) { 53 54 return; 54 55 } 55 56