Merge "Reserve space for the "Reply" link when hiding it"

This commit is contained in:
jenkins-bot 2019-12-02 16:54:28 +00:00 committed by Gerrit Code Review
commit f64ecd9904
2 changed files with 7 additions and 3 deletions

View file

@ -20,7 +20,7 @@ function setupComment( comment ) {
.on( 'click', function () {
var $link = $( this );
$link.hide();
$link.addClass( 'dt-init-replylink-active' );
// TODO: Allow users to use multiple reply widgets simlutaneously
// Currently as all widgets share the same Parsoid doc, this could
// cause problems.
@ -42,7 +42,7 @@ function setupComment( comment ) {
);
replyWidget.on( 'cancel', function () {
$link.show();
$link.removeClass( 'dt-init-replylink-active' );
$pageContainer.removeClass( 'dt-init-replylink-open' );
$( newListItem ).hide();
} );
@ -50,7 +50,7 @@ function setupComment( comment ) {
$( newListItem ).empty().append( replyWidget.$element );
return replyWidget;
}, function () {
$link.show();
$link.removeClass( 'dt-init-replylink-active' );
$pageContainer.removeClass( 'dt-init-replylink-open' );
} );
}

View file

@ -2,6 +2,10 @@
user-select: none;
margin-left: 0.25em;
&.dt-init-replylink-active {
visibility: hidden;
}
.dt-init-replylink-open & {
color: #72777d;
pointer-events: none;