Attempt to fix selection loss on Ctrl.

This commit is contained in:
John Preston 2023-08-16 14:08:42 +02:00
parent b5d3391956
commit 3aebf59a61
1 changed files with 4 additions and 1 deletions

View File

@ -1806,7 +1806,10 @@ bool HistoryWidget::notify_switchInlineBotButtonReceived(
void HistoryWidget::tryProcessKeyInput(not_null<QKeyEvent*> e) { void HistoryWidget::tryProcessKeyInput(not_null<QKeyEvent*> e) {
e->accept(); e->accept();
keyPressEvent(e); keyPressEvent(e);
if (!e->isAccepted() && _canSendTexts && _field->isVisible()) { if (!e->isAccepted()
&& _canSendTexts
&& _field->isVisible()
&& !e->text().isEmpty()) {
_field->setFocusFast(); _field->setFocusFast();
QCoreApplication::sendEvent(_field->rawTextEdit(), e); QCoreApplication::sendEvent(_field->rawTextEdit(), e);
} }