Fix Bug 47533
This commit is contained in:
parent
7946d762a7
commit
525a0a4aec
|
@ -291,7 +291,7 @@ define([
|
|||
|
||||
return false;
|
||||
},
|
||||
onShowComment: function (id, selected) {
|
||||
onShowComment: function (id, selected, fromLeftPanelSelection) {
|
||||
var comment = this.findComment(id);
|
||||
if (comment) {
|
||||
if (null !== comment.get('quote')) {
|
||||
|
@ -319,9 +319,11 @@ define([
|
|||
this.isSelectedComment = selected;
|
||||
}
|
||||
|
||||
this.api.asc_selectComment(id);
|
||||
this._dontScrollToComment = true;
|
||||
this.api.asc_showComment(id,false);
|
||||
if (!fromLeftPanelSelection || !((0 === _.difference(this.uids, [id]).length) && (0 === _.difference([id], this.uids).length))) {
|
||||
this.api.asc_selectComment(id);
|
||||
this._dontScrollToComment = true;
|
||||
this.api.asc_showComment(id,false);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
|
|
|
@ -283,7 +283,16 @@ define([
|
|||
} else if (!btn.hasClass('msg-reply') &&
|
||||
!btn.hasClass('btn-resolve-check') &&
|
||||
!btn.hasClass('btn-resolve')) {
|
||||
me.fireEvent('comment:show', [commentId, false]);
|
||||
var isTextSelected = false;
|
||||
if (btn.hasClass('user-message')) {
|
||||
if (window.getSelection) {
|
||||
var selection = window.getSelection();
|
||||
isTextSelected = (selection.toString()!=='')
|
||||
} else if (document.selection) {
|
||||
isTextSelected = document.selection;
|
||||
}
|
||||
}
|
||||
me.fireEvent('comment:show', [commentId, false, isTextSelected]);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue