-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Support editor rtl mode without wrapped lines #4665
base: master
Are you sure you want to change the base?
Conversation
Nice. Some things jump out though (tested in Chrome):
|
Both should be fixed now. |
A few more: When you have a long line in an rtl editor (which also has a vertical scrollbar), the left end of the line ends up below the scrollbar. Also, anything beyond the first screen width, horizontally, doesn't get selection drawn (the selection rectangles stop at the original width) and doesn't properly handle mouse clicks (they are treated as if they are inside the original width) |
(This kind of stuff is why my first impulse was to forget about putting the scrollbar on the left, but I applaud your effort to do things right.) |
0b366e5
to
0844945
Compare
Chromium?
Should be better now. |
Yes, the content under the scrollbar happens in Chrome (57).
Great! Also, in the editor on index.html (which auto-resizes up to a certain point), when you type a long line the horizontal scrollbar initially doesn't appear, both in Firefox and Chrome. Note that many parts of the scrolling code are written the way they are because they need to handle both the auto-resize-through-CSS and the scrollbar model, and you'll have to test both when you touch it. That stuff could use more automated tests I guess, especially since different browsers behave slightly differently with, for example, how they handle the way a margin on an absolutely positioned element influences the parent container's size. Then I got this error a few times when clicking around in an RTL editor:
And clicking on the rightmost part of the document in RTL mode when there's a horizontal scrollbar (which is scrolled all the way to the right) often (but not always) causes the editor to scroll to the left, in Firefox and Chrome. I saw the gutter in the wrong place a few times, directly after setting the direction option, or during scrolling. I can reliably reproduce this by opening mode/javascript/index.html in Chrome and running |
Fixed.
I think this should only happen in Chrome, not in Firefox. I used Epiphany for Webkit testing, which as I realized today handles |
This seems to work pretty well, even with changing
fixedGutter
anddirection
.