Skip to content

[Peek] Fix horizontal and vertical scrolling when text wrapping is disabled#5

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-4
Draft

[Peek] Fix horizontal and vertical scrolling when text wrapping is disabled#5
Copilot wants to merge 2 commits intomainfrom
copilot/fix-4

Conversation

Copy link

Copilot AI commented May 23, 2025

Issue

When disabling text wrapping in Peek and viewing a file that exceeds the width of the window, a horizontal scrollbar appears. When users try to scroll horizontally with a trackpad, vertical scrolling stops working - the only way to continue scrolling vertically is to manually drag the vertical scrollbar.

Solution

The issue was resolved by modifying the Monaco editor scrollbar configuration in index.html:

  1. Added scrollPredominantAxis: false to allow simultaneous scrolling on both horizontal and vertical axes
  2. Added mouseWheelScrollSensitivity: 1 to ensure standard scrolling sensitivity is maintained

These minimal changes ensure that users can properly navigate content both horizontally and vertically when text wrapping is disabled, without disrupting any other functionality.

Testing

Verified that:

  • Both horizontal and vertical scrolling work simultaneously with text wrapping disabled
  • The fix doesn't affect any other Monaco editor functionality
  • The original text wrapping toggle feature continues to work correctly

Fixes #4.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: lei9444 <39758135+lei9444@users.noreply.github.com>
Copilot AI changed the title [WIP] [Peek]: When disabling Text Wrapping scrolling don't work [Peek] Fix horizontal and vertical scrolling when text wrapping is disabled May 23, 2025
Copilot AI requested a review from lei9444 May 23, 2025 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Peek]: When disabling Text Wrapping scrolling don't work

2 participants