Browse Source

fix scrollbar for RTL languages (#1150)

make the behavior same as before for both RTL and LTR languages

make solution use dynamic scrollbar size

as suggested in CR
master
Neil Kalman 8 years ago committed by Igor Zhukov
parent
commit
9b650c5c8f
  1. 10
      app/js/message_composer.js
  2. 4
      app/less/desktop.less

10
app/js/message_composer.js

@ -733,7 +733,15 @@ MessageComposer.prototype.setUpInput = function () { @@ -733,7 +733,15 @@ MessageComposer.prototype.setUpInput = function () {
if (!Config.Mobile) {
var sbWidth = getScrollWidth()
if (sbWidth) {
(this.richTextareaEl || this.textareaEl).css({marginRight: -sbWidth})
// hide scrollbar for both LTR and RTL languages
// both scrollbars are hidden inside the paddings
// that are overflown outside of view
(this.richTextareaEl || this.textareaEl).css({
left: -sbWidth,
width: 'calc(100% + ' + (2 * sbWidth) + 'px)',
'padding-left': sbWidth + 2,
'padding-right': sbWidth + 28
})
}
}
}

4
app/less/desktop.less

@ -1154,11 +1154,13 @@ a.im_panel_peer_photo .peer_initials { @@ -1154,11 +1154,13 @@ a.im_panel_peer_photo .peer_initials {
box-shadow: none;
outline: none;
box-shadow: 0 1px 0 0 #e8e8e8;
padding: 1px 30px 1px 0;
padding: 1px 28px 1px 0;
position: relative;
margin: 0;
min-height: 50px;
line-height: 20px;
height: auto;
box-sizing: border-box;
&:focus {
border: 0;

Loading…
Cancel
Save