diff --git a/comment/comment.js b/comment/comment.js index 5ea19a6b8e0..7474f305cc6 100644 --- a/comment/comment.js +++ b/comment/comment.js @@ -361,7 +361,13 @@ bodyContent: '
'); + this.icon = Y.Node.create(''); // Shrink the div as it is collapsed by default this.div.setStyle('height', caption.get('offsetHeight')+'px'); } else { @@ -126,8 +132,14 @@ M.util.CollapsibleRegion = function(Y, id, userpref, strtooltip) { // Handler for the animation finishing. animation.on('end', function() { this.div.toggleClass('collapsed'); + var collapsedimage = 't/collapsed'; // ltr mode + if ( Y.one(document.body).hasClass('dir-rtl') ) { + collapsedimage = 't/collapsed_rtl'; + } else { + collapsedimage = 't/collapsed'; + } if (this.div.hasClass('collapsed')) { - this.icon.set('src', M.util.image_url('t/collapsed', 'moodle')); + this.icon.set('src', M.util.image_url(collapsedimage, 'moodle')); } else { this.icon.set('src', M.util.image_url('t/expanded', 'moodle')); }