diff --git a/src/widget/chatareawidget.cpp b/src/widget/chatareawidget.cpp index 22886ba8c..aeb138014 100644 --- a/src/widget/chatareawidget.cpp +++ b/src/widget/chatareawidget.cpp @@ -65,7 +65,7 @@ void ChatAreaWidget::mouseReleaseEvent(QMouseEvent * event) QTextCursor cursor(document()); cursor.setPosition(pos); - if(!cursor.atEnd()) + if (!cursor.atEnd()) { cursor.setPosition(pos+1); diff --git a/src/widget/form/genericchatform.cpp b/src/widget/form/genericchatform.cpp index 30dadae74..411af8350 100644 --- a/src/widget/form/genericchatform.cpp +++ b/src/widget/form/genericchatform.cpp @@ -255,7 +255,8 @@ void GenericChatForm::onEmoteButtonClicked() void GenericChatForm::onChatWidgetClicked() { - msgEdit->setFocus(); + if (!chatWidget->textCursor().hasSelection()) + msgEdit->setFocus(); } void GenericChatForm::onEmoteInsertRequested(QString str)