Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(VirtualRenderer): fix scrollbar overlap on autocompletion #5713

Merged
merged 5 commits into from
Jan 20, 2025

Conversation

xyos
Copy link
Contributor

@xyos xyos commented Jan 8, 2025

Description of changes:

Ace's VirtualRenderer has an issue where scrollbars sometimes overlap the content on the autocomplete container. The virtual renderer checks the logic for hiding scrollbars using the previous content size, which causes an overlap between the scrollbar and the content (see the attached video). To resolve this, the autosize calculation logic was moved before checking whether to hide the toolbar. This adjustment ensures that the next calculation of hideScrollbars considers the new size (see the second video).

scrollbar overlapping content

Screen.Recording.2025-01-08.at.2.12.50.PM.mov

fixed

Screen.Recording.2025-01-08.at.2.13.36.PM.mov

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Pull Request Checklist:

Copy link

codecov bot commented Jan 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.05%. Comparing base (e445aaf) to head (b3def7f).
Report is 9 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5713      +/-   ##
==========================================
+ Coverage   87.02%   87.05%   +0.03%     
==========================================
  Files         598      598              
  Lines       43593    43703     +110     
  Branches     7163     7163              
==========================================
+ Hits        37936    38047     +111     
+ Misses       5657     5656       -1     
Flag Coverage Δ
unittests 87.05% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@marinsokol5
Copy link
Contributor

@nightwing wyt?

@nightwing nightwing changed the title fix(VirtualRenderer): fix toolbar overlap on autocompletion fix(VirtualRenderer): fix scrollbar overlap on autocompletion Jan 8, 2025
@nightwing
Copy link
Member

This fixes the issue with popup, but I think this will cause the horizontal scrollbar to overlap instead, so we need to add some tests to cover all the edge cases of combination of scrollbars appearing after a change, to be sure that we do not introduce regression or infinite re-render loop.

@nightwing
Copy link
Member

On autoresize demo (https://raw.githack.com/ajaxorg/ace/e0a9dedf60aab405e7b6e0727f8bf165c1fe44e1/demo/autoresize.html), if i paste

1
2
3
long long line aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

the overlapping issue happens for horizontal scrollbar now

@xyos xyos force-pushed the fix/fix-scroll-bar-overlap branch from 0e187ca to b67fa2e Compare January 20, 2025 13:22
@xyos xyos merged commit 5acea6d into ajaxorg:master Jan 20, 2025
3 checks passed
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.

3 participants