diff --git a/resources/celerity/map.php b/resources/celerity/map.php --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -10,7 +10,7 @@ 'conpherence.pkg.css' => 'e68cf1fa', 'conpherence.pkg.js' => '15191c65', 'core.pkg.css' => '39061f68', - 'core.pkg.js' => '1ea38af8', + 'core.pkg.js' => 'e1f0f7bd', 'differential.pkg.css' => '06dc617c', 'differential.pkg.js' => 'c2ca903a', 'diffusion.pkg.css' => 'a2d17c7d', @@ -475,7 +475,7 @@ 'rsrc/js/core/behavior-more.js' => 'a80d0378', 'rsrc/js/core/behavior-object-selector.js' => '77c1f0b0', 'rsrc/js/core/behavior-oncopy.js' => '2926fff2', - 'rsrc/js/core/behavior-phabricator-nav.js' => '836f966d', + 'rsrc/js/core/behavior-phabricator-nav.js' => '94b7c320', 'rsrc/js/core/behavior-phabricator-remarkup-assist.js' => 'acd29eee', 'rsrc/js/core/behavior-read-only-warning.js' => 'ba158207', 'rsrc/js/core/behavior-redirect.js' => '0213259f', @@ -635,7 +635,7 @@ 'javelin-behavior-phabricator-keyboard-pager' => 'a8da01f0', 'javelin-behavior-phabricator-keyboard-shortcuts' => '01fca1f0', 'javelin-behavior-phabricator-line-linker' => '1e017314', - 'javelin-behavior-phabricator-nav' => '836f966d', + 'javelin-behavior-phabricator-nav' => '94b7c320', 'javelin-behavior-phabricator-notification-example' => '8ce821c5', 'javelin-behavior-phabricator-object-selector' => '77c1f0b0', 'javelin-behavior-phabricator-oncopy' => '2926fff2', @@ -1547,16 +1547,6 @@ 'javelin-behavior', 'javelin-scrollbar', ), - '836f966d' => array( - 'javelin-behavior', - 'javelin-behavior-device', - 'javelin-stratcom', - 'javelin-dom', - 'javelin-magical-init', - 'javelin-vector', - 'javelin-request', - 'javelin-util', - ), '8499b6ab' => array( 'javelin-behavior', 'javelin-dom', @@ -1658,6 +1648,16 @@ 'javelin-resource', 'javelin-routable', ), + '94b7c320' => array( + 'javelin-behavior', + 'javelin-behavior-device', + 'javelin-stratcom', + 'javelin-dom', + 'javelin-magical-init', + 'javelin-vector', + 'javelin-request', + 'javelin-util', + ), '960f6a39' => array( 'javelin-behavior', 'javelin-dom', diff --git a/webroot/rsrc/js/core/behavior-phabricator-nav.js b/webroot/rsrc/js/core/behavior-phabricator-nav.js --- a/webroot/rsrc/js/core/behavior-phabricator-nav.js +++ b/webroot/rsrc/js/core/behavior-phabricator-nav.js @@ -49,7 +49,7 @@ { element: drag, parameter: 'left', - start: JX.$V(drag).x + start: get_width() }, { element: content, @@ -102,15 +102,24 @@ .setData( { key: 'filetree.width', - value: JX.$V(drag).x + value: get_width() }) .send(); }); + function get_width() { + // See PHI568. If the document has scrolled horizontally, the "x" position + // of the bar will be the actual width of the menu plus the horizontal + // scroll position (because the element is "position: fixed"). Subtract the + // document scroll position when saving the element width so that scrolling + // to the right and then toggling the filetree UI does not make it grow + // any wider. + return (JX.$V(drag).x - JX.Vector.getScroll().x); + } var saved_width = config.width; function savedrag() { - saved_width = JX.$V(drag).x; + saved_width = get_width(); local.style.width = ''; drag.style.left = '';