Add id to clone div; override inline styles for rtl locales

This commit is contained in:
scossar 2017-12-28 12:47:34 -08:00
parent e6fd7eb464
commit b652791a20
2 changed files with 7 additions and 1 deletions

View File

@ -56,3 +56,9 @@ float: left !important;
.rtl .dashboard-right {
float: left !important;
}
// Right and left will be flipped by the r2 gem
.rtl #caret-clone[style] {
right: auto !important;
left: -7000px !important;
}

View File

@ -45,7 +45,7 @@ $.fn.caretPosition = function(options) {
};
styles = getStyles(textarea[0]);
clone = $("<div><p></p></div>").appendTo("body");
clone = $("<div id='caret-clone'><p></p></div>").appendTo("body");
p = clone.find("p");
clone.width(textarea.width());
clone.height(textarea.height());