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

diffusion / differential - better handle case where no comment selected

Summary: Right now, if no comment is selected the JS executes and throws an exception. Instead, if nothing is selected just do nothing. Fixes T6107.

Test Plan: opened up a commit in diffusion with an inline comment. pressed 'r' and saw no exceptions and nothing happen. pressed 'n' to select the next inline comment and then 'r' and it worked. opened up a commit in diffusion without any inline comments. pressed 'r' and saw no exceptions and nothing happen. opened up a diff in differential with an inline comment. pressed 'r' and saw no exceptons and nothing happened. pressed 'n' to select the next inline comment and then 'r' and it worked.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6107

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

+13 -9
+9 -9
resources/celerity/map.php
··· 11 11 'core.pkg.js' => 'cbdbd552', 12 12 'darkconsole.pkg.js' => 'df001cab', 13 13 'differential.pkg.css' => '8af45893', 14 - 'differential.pkg.js' => '85cb2027', 14 + 'differential.pkg.js' => '42c10e78', 15 15 'diffusion.pkg.css' => '591664fa', 16 16 'diffusion.pkg.js' => 'bfc0737b', 17 17 'maniphest.pkg.css' => 'e34dfbec', ··· 369 369 'rsrc/js/application/differential/behavior-diff-radios.js' => 'e1ff79b1', 370 370 'rsrc/js/application/differential/behavior-dropdown-menus.js' => '710f209e', 371 371 'rsrc/js/application/differential/behavior-edit-inline-comments.js' => '00861799', 372 - 'rsrc/js/application/differential/behavior-keyboard-nav.js' => '8d199d97', 372 + 'rsrc/js/application/differential/behavior-keyboard-nav.js' => '2c426492', 373 373 'rsrc/js/application/differential/behavior-populate.js' => 'bdb3e4d0', 374 374 'rsrc/js/application/differential/behavior-show-all-comments.js' => '7c273581', 375 375 'rsrc/js/application/differential/behavior-show-field-details.js' => 'bba9eedf', ··· 572 572 'javelin-behavior-differential-dropdown-menus' => '710f209e', 573 573 'javelin-behavior-differential-edit-inline-comments' => '00861799', 574 574 'javelin-behavior-differential-feedback-preview' => '6932def3', 575 - 'javelin-behavior-differential-keyboard-navigation' => '8d199d97', 575 + 'javelin-behavior-differential-keyboard-navigation' => '2c426492', 576 576 'javelin-behavior-differential-populate' => 'bdb3e4d0', 577 577 'javelin-behavior-differential-show-field-details' => 'bba9eedf', 578 578 'javelin-behavior-differential-show-more' => 'dd7e8ef5', ··· 1009 1009 'javelin-stratcom', 1010 1010 'javelin-dom', 1011 1011 ), 1012 + '2c426492' => array( 1013 + 'javelin-behavior', 1014 + 'javelin-dom', 1015 + 'javelin-stratcom', 1016 + 'phabricator-keyboard-shortcut', 1017 + ), 1012 1018 '2fa810fc' => array( 1013 1019 'javelin-behavior', 1014 1020 'javelin-dom', ··· 1415 1421 'javelin-dom', 1416 1422 'javelin-uri', 1417 1423 'phabricator-file-upload', 1418 - ), 1419 - '8d199d97' => array( 1420 - 'javelin-behavior', 1421 - 'javelin-dom', 1422 - 'javelin-stratcom', 1423 - 'phabricator-keyboard-shortcut', 1424 1424 ), 1425 1425 '8ef9ab58' => array( 1426 1426 'javelin-behavior',
+4
webroot/rsrc/js/application/differential/behavior-keyboard-nav.js
··· 242 242 243 243 244 244 function inline_op(node, op) { 245 + // nothing selected 246 + if (!node) { 247 + return; 248 + } 245 249 if (!JX.DOM.scry(node, 'a', 'differential-inline-' + op)) { 246 250 // No link for this operation, e.g. editing a comment you can't edit. 247 251 return;