Fix small comments bugs (#1832)

This commit is contained in:
aignatov-bio 2019-06-14 16:20:47 +02:00 committed by GitHub
parent 68937dd192
commit da8d748c49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 3 deletions

View file

@ -85,6 +85,7 @@ function initInlineEditing(title) {
if (inputString.disabled) {
saveAllEditFields();
editBlock.dataset.editMode = 1;
$editBlock.closest('.inline_scroll_block').scrollTop(editBlock.offsetTop);
inputString.disabled = false;
$inputString.removeClass('hidden');
$editBlock.find('.view-mode').addClass('hidden');

View file

@ -76,6 +76,7 @@ var Comments = (function() {
$el.find('#message').val('');
$el.find('.new-comment-button').removeClass('show');
newButton.disable = false;
$el.find('textarea').focus().blur();
})
.error((error) => {
errorField.html(error.responseJSON.errors.message);

View file

@ -239,13 +239,16 @@
.new-comment-button {
cursor: pointer;
font-size: 18px;
font-size: 14px;
line-height: 18px;
margin: 8px;
margin: 4px;
padding: 4px;
position: absolute;
right: -36px;
text-align: center;
top: 0;
transition: $md-transaction;
width: 26px;
&.show {
right: 0;

View file

@ -1,6 +1,6 @@
<div class="comments-container" data-object-id = <%= object.id %>>
<% per_page = Constants::COMMENTS_SEARCH_LIMIT %>
<div class="content-comments">
<div class="content-comments inline_scroll_block">
<% if comments.size == per_page %>
<div class="comment-more text-center">
<a class="btn btn-default btn-more-comments-new"