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

(Wrap text): The feature work unexpected when scrollbar appear #5709

Open
skillcrushbinguyen opened this issue Dec 27, 2024 · 5 comments
Open
Labels

Comments

@skillcrushbinguyen
Copy link

skillcrushbinguyen commented Dec 27, 2024

Describe the bug

When I set a fixed width for editor and configured wrap option is true. The editor work un-correct when the scrollbar appear.
This is a evident
demo

Expected Behavior

The line breaks correctly when reaching container width with and without the scrollbar

Current Behavior

When the scrollbar appears some of the characters were break to new lines because the width of the editor change

Reproduction Steps

Paste the content to editor and press Enter key until the scrollbar appear
0123456789012345678901234567890123456789

Possible Solution

No response

Additional Information/Context

I put the demo here to easy reproduce the problem
https://jsfiddle.net/binguyen858/nsteLdg3/6/

Ace Version / Browser / OS / Keyboard layout

Ace version: 1.9,6
Browser: Chrome
Keyboard layout: ENG

@whazor
Copy link
Contributor

whazor commented Dec 30, 2024

Hi, I think "BIZ UDGothic" is not a mono-width font and therefore not supported by ACE (See #460).

Can you confirm this bug is still there when using the default font?

@skillcrushbinguyen
Copy link
Author

Hi @whazor ,
The problem still there when I using a default font.
Check this out: https://jsfiddle.net/binguyen858/nsteLdg3/9/
This is an evidence:
half-width

@nightwing
Copy link
Member

@skillcrushbinguyen when scrollbar appears the wrapping changes in textarea and other editors as well. Which behavior do you expect instead of that?

@skillcrushbinguyen
Copy link
Author

@nightwing My expectation is that the line will not break when the scrollbar appears. In the demo above, the character 91 should persist in the first line

@nightwing
Copy link
Member

But then where should the scrollbar go? it will either cover the text or editor size will have to change, or we would have to reserve space from the start and always display 91 on the second line.

@marinsokol5 marinsokol5 added the p2 label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants