Bug 26462: add new comment to text with other comments

This commit is contained in:
Julia Radzhabova 2019-02-25 19:10:03 +03:00
parent ff830bb4eb
commit 934bcbc4c4

View file

@ -1257,11 +1257,14 @@ define([
if (this.api) {
var me = this, anchor = null, date = new Date(), dialog = this.getPopover();
if (dialog) {
if (this.popoverComments.length) {
_.delay(function() {
dialog.commentsView.setFocusToTextBox();
}, 200);
return;
if (this.popoverComments.length) {// can add new comment to text with other comments
if (this.isDummyComment) {//don't hide previous dummy comment
_.delay(function() {
dialog.commentsView.setFocusToTextBox();
}, 200);
return;
} else
this.closeEditing(); // add dummy comment and close editing for existing comment
}
var user = this.userCollection.findOriginalUser(this.currentUserId);