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

Make scroll keys active immediately upon page load

Summary:
When JX.Scrollbar activates, the page needs to be clicked before scrolling keys work.

Instead, set focus into the content after we set the page frame (if something else isn't already focused).

Also fixes T7042.

Test Plan: In Safari, Chrome and Firefox, scrolling with key commands is now immediately active.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T7042

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

+55 -27
+23 -23
resources/celerity/map.php
··· 7 7 */ 8 8 return array( 9 9 'names' => array( 10 - 'core.pkg.css' => 'a793698c', 11 - 'core.pkg.js' => '63963771', 10 + 'core.pkg.css' => '30ec4610', 11 + 'core.pkg.js' => '55716d41', 12 12 'darkconsole.pkg.js' => '8ab24e01', 13 13 'differential.pkg.css' => '8af45893', 14 14 'differential.pkg.js' => 'f437e70e', ··· 39 39 'rsrc/css/application/base/main-menu-view.css' => '7bb9c588', 40 40 'rsrc/css/application/base/notification-menu.css' => '6aa0a74b', 41 41 'rsrc/css/application/base/phabricator-application-launch-view.css' => '16ca323f', 42 - 'rsrc/css/application/base/standard-page-view.css' => '6dafdb3b', 42 + 'rsrc/css/application/base/standard-page-view.css' => '661ae3e3', 43 43 'rsrc/css/application/chatlog/chatlog.css' => '852140ff', 44 44 'rsrc/css/application/config/config-options.css' => '7fedf08b', 45 45 'rsrc/css/application/config/config-template.css' => '25d446d6', ··· 107 107 'rsrc/css/core/core.css' => 'd7f6ec35', 108 108 'rsrc/css/core/remarkup.css' => '0ee3d256', 109 109 'rsrc/css/core/syntax.css' => '56c1ba38', 110 - 'rsrc/css/core/z-index.css' => '07df2e53', 110 + 'rsrc/css/core/z-index.css' => '40eb7003', 111 111 'rsrc/css/diviner/diviner-shared.css' => '38813222', 112 112 'rsrc/css/font/font-awesome.css' => '21b0ced7', 113 113 'rsrc/css/font/font-source-sans-pro.css' => '91d53463', ··· 188 188 'rsrc/externals/javelin/ext/view/__tests__/ViewInterpreter.js' => '7a94d6a5', 189 189 'rsrc/externals/javelin/ext/view/__tests__/ViewRenderer.js' => '6ea96ac9', 190 190 'rsrc/externals/javelin/lib/Cookie.js' => '62dfea03', 191 - 'rsrc/externals/javelin/lib/DOM.js' => 'c5ca25cf', 191 + 'rsrc/externals/javelin/lib/DOM.js' => '2d66f6ec', 192 192 'rsrc/externals/javelin/lib/History.js' => 'c60f4327', 193 193 'rsrc/externals/javelin/lib/JSON.js' => '69adf288', 194 194 'rsrc/externals/javelin/lib/Leader.js' => '331b1611', ··· 197 197 'rsrc/externals/javelin/lib/Resource.js' => '44959b73', 198 198 'rsrc/externals/javelin/lib/Routable.js' => 'b3e7d692', 199 199 'rsrc/externals/javelin/lib/Router.js' => '29274e2b', 200 - 'rsrc/externals/javelin/lib/Scrollbar.js' => '814d9ea1', 200 + 'rsrc/externals/javelin/lib/Scrollbar.js' => '479fd9f1', 201 201 'rsrc/externals/javelin/lib/URI.js' => '6eff08aa', 202 202 'rsrc/externals/javelin/lib/Vector.js' => 'cc1bd0b0', 203 203 'rsrc/externals/javelin/lib/WebSocket.js' => '3f840822', ··· 648 648 'javelin-color' => '7e41274a', 649 649 'javelin-cookie' => '62dfea03', 650 650 'javelin-diffusion-locate-file-source' => 'b42eddc7', 651 - 'javelin-dom' => 'c5ca25cf', 651 + 'javelin-dom' => '2d66f6ec', 652 652 'javelin-dynval' => 'f6555212', 653 653 'javelin-event' => '85ea0626', 654 654 'javelin-fx' => '54b612ba', ··· 666 666 'javelin-resource' => '44959b73', 667 667 'javelin-routable' => 'b3e7d692', 668 668 'javelin-router' => '29274e2b', 669 - 'javelin-scrollbar' => '814d9ea1', 669 + 'javelin-scrollbar' => '479fd9f1', 670 670 'javelin-stratcom' => '8b0ad945', 671 671 'javelin-tokenizer' => '7644823e', 672 672 'javelin-typeahead' => '70baed2f', ··· 731 731 'phabricator-side-menu-view-css' => '7e8c6341', 732 732 'phabricator-slowvote-css' => '266df6a1', 733 733 'phabricator-source-code-view-css' => '7d346aa4', 734 - 'phabricator-standard-page-view' => '6dafdb3b', 734 + 'phabricator-standard-page-view' => '661ae3e3', 735 735 'phabricator-textareautils' => '5c93c52c', 736 736 'phabricator-title' => '5c1c758c', 737 737 'phabricator-tooltip' => '1d298e3a', ··· 747 747 'phabricator-uiexample-reactor-select' => 'a155550f', 748 748 'phabricator-uiexample-reactor-sendclass' => '1def2711', 749 749 'phabricator-uiexample-reactor-sendproperties' => 'b1f0ccee', 750 - 'phabricator-zindex-css' => '07df2e53', 750 + 'phabricator-zindex-css' => '40eb7003', 751 751 'phame-css' => '19ecc703', 752 752 'pholio-css' => '95174bdd', 753 753 'pholio-edit-css' => '3ad9d1ee', ··· 999 999 'javelin-stratcom', 1000 1000 'phabricator-keyboard-shortcut', 1001 1001 ), 1002 + '2d66f6ec' => array( 1003 + 'javelin-magical-init', 1004 + 'javelin-install', 1005 + 'javelin-util', 1006 + 'javelin-vector', 1007 + 'javelin-stratcom', 1008 + ), 1002 1009 '2f6efe18' => array( 1003 1010 'javelin-behavior', 1004 1011 'javelin-dom', ··· 1108 1115 'javelin-dom', 1109 1116 'javelin-view-renderer', 1110 1117 'javelin-install', 1118 + ), 1119 + '479fd9f1' => array( 1120 + 'javelin-install', 1121 + 'javelin-dom', 1122 + 'javelin-stratcom', 1123 + 'javelin-vector', 1111 1124 ), 1112 1125 '47c794d8' => array( 1113 1126 'javelin-install', ··· 1372 1385 'javelin-behavior', 1373 1386 'javelin-history', 1374 1387 ), 1375 - '814d9ea1' => array( 1376 - 'javelin-install', 1377 - 'javelin-dom', 1378 - 'javelin-stratcom', 1379 - 'javelin-vector', 1380 - ), 1381 1388 82439934 => array( 1382 1389 'javelin-behavior', 1383 1390 'javelin-dom', ··· 1688 1695 'javelin-dom', 1689 1696 'javelin-stratcom', 1690 1697 'javelin-vector', 1691 - ), 1692 - 'c5ca25cf' => array( 1693 - 'javelin-magical-init', 1694 - 'javelin-install', 1695 - 'javelin-util', 1696 - 'javelin-vector', 1697 - 'javelin-stratcom', 1698 1698 ), 1699 1699 'c60f4327' => array( 1700 1700 'javelin-stratcom',
+5
webroot/rsrc/css/application/base/standard-page-view.css
··· 194 194 .jx-scrollbar-bar .jx-scrollbar-visible { 195 195 opacity: 0.7; 196 196 } 197 + 198 + .jx-scrollbar-link { 199 + position: absolute; 200 + left: -50px; 201 + }
+4 -4
webroot/rsrc/css/core/z-index.css
··· 97 97 z-index: 9; 98 98 } 99 99 100 + .jx-scrollbar-bar { 101 + z-index: 9; 102 + } 103 + 100 104 .jx-mask { 101 105 z-index: 10; 102 106 } ··· 127 131 128 132 .jx-hovercard-container { 129 133 z-index: 17; 130 - } 131 - 132 - .jx-scrollbar-bar { 133 - z-index: 18; 134 134 } 135 135 136 136 .pholio-device-lightbox {
+23
webroot/rsrc/externals/javelin/lib/Scrollbar.js
··· 147 147 // If we activated the scrollbar, the viewport and content nodes become 148 148 // the new scroll and content frames. 149 149 JX.DOM.setContentFrame(this._viewport, this._content); 150 + 151 + // If nothing is focused, or the document body is focused, change focus 152 + // to the viewport. This makes the arrow keys, spacebar, and page 153 + // up/page down keys work immediately after the page loads, without 154 + // requiring a click. 155 + 156 + // Focusing the <div /> itself doesn't work on any browser, so we 157 + // add a fake, focusable element and focus that instead. 158 + var focus = document.activeElement; 159 + if (!focus || focus == window.document.body) { 160 + var link = JX.$N('a', {href: '#', className: 'jx-scrollbar-link'}); 161 + JX.DOM.listen(link, 'blur', null, function() { 162 + // When the user clicks anything else, remove this. 163 + JX.DOM.remove(link); 164 + }); 165 + JX.DOM.listen(link, 'click', null, function(e) { 166 + // Don't respond to clicks. Since the link isn't visible, this 167 + // most likely means the user hit enter or something like that. 168 + e.kill(); 169 + }); 170 + JX.DOM.prependContent(this._viewport, link); 171 + JX.DOM.focus(link); 172 + } 150 173 } else { 151 174 // Otherwise, the unaltered content frame is both the scroll frame and 152 175 // content frame.