GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: stop sidebar resizer stranding in the editor area · phcode-dev/phoenix@e0107ea

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • utils
      • Resizer.js
    • view
      • CentralControlBar.js
      • WorkspaceManager.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/utils/Resizer.js‎

Copy file name to clipboardExpand all lines: src/utils/Resizer.js
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,13 @@ define(function (require, exports, module) {
394394
// reposition it if the element size changes externally
395395
function repositionResizer(elementSize) {
396396
var resizerPosition = elementSize || 1;
397-
if (position === POSITION_RIGHT || position === POSITION_BOTTOM) {
398-
$resizer.css(resizerCSSPosition, resizerPosition);
397+
if (position !== POSITION_RIGHT && position !== POSITION_BOTTOM) {
398+
return;
399399
}
400+
if (collapsible && !isVisible($element)) {
401+
return;
402+
}
403+
$resizer.css(resizerCSSPosition, resizerPosition);
400404
}
401405

402406
$element.data("removeSizable", function () {
Collapse file

‎src/view/CentralControlBar.js‎

Copy file name to clipboardExpand all lines: src/view/CentralControlBar.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,8 @@ define(function (require, exports, module) {
213213
if (targetWidth < minLPToolbarWidth) {
214214
targetWidth = minLPToolbarWidth;
215215
}
216-
if (sidebarWidth + BAR_WIDTH + targetWidth + MIN_EDITOR_WIDTH > window.innerWidth) {
216+
if (SidebarView.isVisible() &&
217+
sidebarWidth + BAR_WIDTH + targetWidth + MIN_EDITOR_WIDTH > window.innerWidth) {
217218
const trimmedSidebar = Math.max(30, window.innerWidth - BAR_WIDTH - targetWidth - MIN_EDITOR_WIDTH);
218219
$sidebar.width(trimmedSidebar);
219220
// jQuery .width() sidesteps Resizer — manually reposition its handle so
Collapse file

‎src/view/WorkspaceManager.js‎

Copy file name to clipboardExpand all lines: src/view/WorkspaceManager.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ define(function (require, exports, module) {
608608
return;
609609
}
610610
var $sb = $("#sidebar");
611-
if (!$sb.length || $sb[0].offsetWidth === 0) {
611+
if (!$sb.length || !Resizer.isVisible($sb) || $sb[0].offsetWidth === 0) {
612612
return;
613613
}
614614
var toolbarW = $mainToolbar.is(":visible") ? $mainToolbar.width() : 0;

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.