You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an input box appears in a relatively placed element in an RTL course, the MathQuill toolbar placement is problematic.
See the sample problem file chain01.txt and the image below. All is OK when the course language is English, but with the course language as Hebrew the location blocks the input box.
@drgrice1 Could you help with this? It seems the JavaScript code will need to condition how it calculates placement for these cases depending on whether the primary document direction is LTR (default) or RTL.
where dropping the language line gets placement to work.
Note: The problem triggers a warning. Use of uninitialized value $html_attribs in concatenation (.) or string at line 1794 of [PG]/macros/core/PGbasicmacros.pl A fix is below. Eventually I'll get a PR in.
diff --git a/macros/core/PGbasicmacros.pl b/macros/core/PGbasicmacros.pl
index 793e7b0c..3aeb3b55 100644
--- a/macros/core/PGbasicmacros.pl
+++ b/macros/core/PGbasicmacros.pl
@@ -1773,7 +1773,7 @@ sub openDivSpan {
return ();
}
my $option_ref = {};
- my $html_attribs;
+ my $html_attribs = '';
if (ref($_[0]) eq 'HASH') {
$option_ref = shift;
$html_attribs = processDivSpanOptions($option_ref);
The text was updated successfully, but these errors were encountered:
The quick and easy solution is to add /*rtl:ignore*/ above line 104 of mqeditor.scss (before right: 10px). That will make the toolbar appear on the right side of the page just as it does for left-to-right languages.
…to-left languages.
Currenlty if the course language is set to he-IL and the
`$perProblemLangAndDirSettingMode` is set to `auto:en:ltr`, then the
computations for the toolbar position make the toolbar on the right but
way to wide. This just makes the toolbar appear the same as for
left-to-right languages. That is not strictly correct, but since the
toolbar is not currently translated, I am not sure much better can be
done at this point.
This addresses issue openwebwork#988.
When an input box appears in a relatively placed element in an RTL course, the MathQuill toolbar placement is problematic.
See the sample problem file chain01.txt and the image below. All is OK when the course language is English, but with the course language as Hebrew the location blocks the input box.
Related to the code at https://github.com/openwebwork/pg/blob/daff8afd342f06d25feb87d4c00280980492e318/htdocs/js/MathQuill/mqeditor.js#L362C9-L362C23
@drgrice1 Could you help with this? It seems the JavaScript code will need to condition how it calculates placement for these cases depending on whether the primary document direction is LTR (default) or RTL.
From
simple.conf
:where dropping the language line gets placement to work.
Note: The problem triggers a warning.
Use of uninitialized value $html_attribs in concatenation (.) or string at line 1794 of [PG]/macros/core/PGbasicmacros.pl
A fix is below. Eventually I'll get a PR in.The text was updated successfully, but these errors were encountered: