diff --git a/src/css/dyna-rules.css b/src/css/dyna-rules.css index 4f0f7207b..a4d73f359 100644 --- a/src/css/dyna-rules.css +++ b/src/css/dyna-rules.css @@ -105,3 +105,7 @@ body[dir="rtl"] #commitButton:before { #diff.editing .CodeMirror-merge-editor .CodeMirror { background-color: #ffe; } +body[dir="rtl"] .CodeMirror-merge-pane-rightmost { + right: unset; + left: 0px; +} diff --git a/src/js/dyna-rules.js b/src/js/dyna-rules.js index a1f8e64c3..32a776db8 100644 --- a/src/js/dyna-rules.js +++ b/src/js/dyna-rules.js @@ -139,6 +139,13 @@ mergeView.options.revertChunk = function( from, fromStart, fromEnd, to, toStart, toEnd ) { + // https://github.com/gorhill/uBlock/issues/3611 + if ( document.body.getAttribute('dir') === 'rtl' ) { + var tmp; + tmp = from; from = to; to = tmp; + tmp = fromStart; fromStart = toStart; toStart = tmp; + tmp = fromEnd; fromEnd = toEnd; toEnd = tmp; + } if ( typeof fromStart.ch !== 'number' ) { fromStart.ch = 0; } if ( fromEnd.ch !== 0 ) { fromEnd.line += 1; } var toAdd = from.getRange(