mirror of
https://github.com/discourse/discourse.git
synced 2025-02-16 08:15:00 +00:00
Merge pull request #5459 from discourse/fix-rtl-caret-clone-position
FIX: caret clone div position for RTL locales
This commit is contained in:
commit
2352c5ecd5
4
vendor/assets/javascripts/caret_position.js
vendored
4
vendor/assets/javascripts/caret_position.js
vendored
@ -54,6 +54,7 @@ $.fn.caretPosition = function(options) {
|
||||
return styles.getPropertyValue(prop);
|
||||
};
|
||||
|
||||
const isRTL = $('html').hasClass('rtl');
|
||||
clone.css({
|
||||
border: "1px solid black",
|
||||
padding: important("padding"),
|
||||
@ -62,7 +63,8 @@ $.fn.caretPosition = function(options) {
|
||||
"overflow-y": "auto",
|
||||
"word-wrap": "break-word",
|
||||
position: "absolute",
|
||||
left: "-7000px"
|
||||
left: isRTL ? "auto" : "-7000px",
|
||||
right: isRTL ? "-7000px" : "auto"
|
||||
});
|
||||
|
||||
p.css({
|
||||
|
Loading…
x
Reference in New Issue
Block a user