@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.

Close lightbox when clicking on image-frame

Summary: Ref T3612. Moves the listener to the frame of the image.

Test Plan: Click on image, no close, click on grey frame, closes image. Test image and document, clicking on arrows.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T3612

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

authored by

Chad Little and committed by
chad
d1838fa5 80570d66

+18 -18
+15 -15
resources/celerity/map.php
··· 9 9 'names' => array( 10 10 'conpherence.pkg.css' => '0b64e988', 11 11 'conpherence.pkg.js' => '6249a1cf', 12 - 'core.pkg.css' => '4107e0f7', 13 - 'core.pkg.js' => '1602cd3d', 12 + 'core.pkg.css' => 'e5fbe031', 13 + 'core.pkg.js' => '426f2dac', 14 14 'darkconsole.pkg.js' => 'e7393ebb', 15 15 'differential.pkg.css' => 'a4ba74b5', 16 16 'differential.pkg.js' => '634399e9', ··· 151 151 'rsrc/css/phui/phui-info-panel.css' => '27ea50a1', 152 152 'rsrc/css/phui/phui-info-view.css' => 'ec92802a', 153 153 'rsrc/css/phui/phui-invisible-character-view.css' => '6993d9f0', 154 - 'rsrc/css/phui/phui-lightbox.css' => 'cbc9b891', 154 + 'rsrc/css/phui/phui-lightbox.css' => '67a017b2', 155 155 'rsrc/css/phui/phui-list.css' => '9da2aa00', 156 156 'rsrc/css/phui/phui-object-box.css' => '6b487c57', 157 157 'rsrc/css/phui/phui-object-item-list-view.css' => '87278fa0', ··· 505 505 'rsrc/js/core/behavior-hovercard.js' => 'bcaccd64', 506 506 'rsrc/js/core/behavior-keyboard-pager.js' => 'a8da01f0', 507 507 'rsrc/js/core/behavior-keyboard-shortcuts.js' => '01fca1f0', 508 - 'rsrc/js/core/behavior-lightbox-attachments.js' => 'e62f3c48', 508 + 'rsrc/js/core/behavior-lightbox-attachments.js' => '24afe1a8', 509 509 'rsrc/js/core/behavior-line-linker.js' => '1499a8cb', 510 510 'rsrc/js/core/behavior-more.js' => 'a80d0378', 511 511 'rsrc/js/core/behavior-object-selector.js' => 'e0ec7f2f', ··· 651 651 'javelin-behavior-history-install' => '7ee2b591', 652 652 'javelin-behavior-icon-composer' => '8499b6ab', 653 653 'javelin-behavior-launch-icon-composer' => '48086888', 654 - 'javelin-behavior-lightbox-attachments' => 'e62f3c48', 654 + 'javelin-behavior-lightbox-attachments' => '24afe1a8', 655 655 'javelin-behavior-line-chart' => 'e4232876', 656 656 'javelin-behavior-load-blame' => '42126667', 657 657 'javelin-behavior-maniphest-batch-editor' => '782ab6e7', ··· 869 869 'phui-info-view-css' => 'ec92802a', 870 870 'phui-inline-comment-view-css' => '5953c28e', 871 871 'phui-invisible-character-view-css' => '6993d9f0', 872 - 'phui-lightbox-css' => 'cbc9b891', 872 + 'phui-lightbox-css' => '67a017b2', 873 873 'phui-list-view-css' => '9da2aa00', 874 874 'phui-object-box-css' => '6b487c57', 875 875 'phui-object-item-list-view-css' => '87278fa0', ··· 1106 1106 'javelin-workflow', 1107 1107 'javelin-util', 1108 1108 ), 1109 + '24afe1a8' => array( 1110 + 'javelin-behavior', 1111 + 'javelin-stratcom', 1112 + 'javelin-dom', 1113 + 'javelin-mask', 1114 + 'javelin-util', 1115 + 'phuix-icon-view', 1116 + 'phabricator-busy', 1117 + ), 1109 1118 '2926fff2' => array( 1110 1119 'javelin-behavior', 1111 1120 'javelin-dom', ··· 2119 2128 'javelin-json', 2120 2129 'javelin-workflow', 2121 2130 'javelin-magical-init', 2122 - ), 2123 - 'e62f3c48' => array( 2124 - 'javelin-behavior', 2125 - 'javelin-stratcom', 2126 - 'javelin-dom', 2127 - 'javelin-mask', 2128 - 'javelin-util', 2129 - 'phuix-icon-view', 2130 - 'phabricator-busy', 2131 2131 ), 2132 2132 'e9581f08' => array( 2133 2133 'javelin-behavior',
-1
webroot/rsrc/css/phui/phui-lightbox.css
··· 43 43 .lightbox-comment-frame { 44 44 position: absolute; 45 45 top: -19999px; 46 - bottom: 0; 47 46 right: 0; 48 47 opacity: 0; 49 48 transition: all 0.3s;
+3 -2
webroot/rsrc/js/core/behavior-lightbox-attachments.js
··· 121 121 JX.$N('div', 122 122 { 123 123 className : 'lightbox-image-frame', 124 + sigil : 'lightbox-image-frame', 124 125 }, 125 126 img 126 127 ); ··· 324 325 // When the user clicks the background, close the lightbox. 325 326 JX.Stratcom.listen( 326 327 'click', 327 - 'lightbox-attachment', 328 + 'lightbox-image-frame', 328 329 function (e) { 329 330 if (!lightbox) { 330 331 return; 331 332 } 332 - if (e.getTarget() != e.getNode('lightbox-attachment')) { 333 + if (e.getTarget() != e.getNode('lightbox-image-frame')) { 333 334 // Don't close if they clicked some other element, like the image 334 335 // itself or the next/previous arrows. 335 336 return;