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 undefined error thrown when using soft wraps and RTL font #4835

Merged
merged 1 commit into from
Jul 17, 2022

Conversation

dntrkv
Copy link
Contributor

@dntrkv dntrkv commented Jul 7, 2022

Issue #:
N/A

Description of changes:
Our organization ran into an issue where we see an undefined error being thrown when users attempt to use RTL fonts in an editor with soft wraps enabled.

I found the offending line of code in the bidihandler.js file where there is a conditional that checks for truthiness of the splits variable but then directly below/outside that block, the code attempts to access splits.length without first checking for truthiness.

Side note: I've found the RTL functionality in Ace to be rather buggy with some weird indentations that appear when writing multiple lines using RTL mode + RTL font. Is there an issue that outlines the current state of support for RTL languages?

@andrewnester
Copy link
Contributor

I don't think we have an active tracking issue for RTL support, we had something previously but it was closed due to inactivity
#4204

Feel free to great one which describes the issues you see

@andrewnester
Copy link
Contributor

For you PR, could you please provide a reproduction steps to verify the fix? Thank you!

@andrewnester andrewnester self-requested a review July 8, 2022 15:56
@codecov
Copy link

codecov bot commented Jul 8, 2022

Codecov Report

Merging #4835 (457b657) into master (e9331bf) will not change coverage.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##           master    #4835   +/-   ##
=======================================
  Coverage   69.94%   69.94%           
=======================================
  Files         559      559           
  Lines       58338    58338           
  Branches    11235    11235           
=======================================
  Hits        40803    40803           
  Misses      17535    17535           
Flag Coverage Δ
unittests 69.94% <0.00%> (ø)

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

Impacted Files Coverage Δ
lib/ace/bidihandler.js 30.25% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e9331bf...457b657. Read the comment docs.

@nightwing nightwing merged commit 922a50e into ajaxorg:master Jul 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants