From dc2192d5cae45d924a6dbebdbd4ec69c039daefb Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 8 Apr 2021 19:02:18 +0400 Subject: [PATCH] Invoke click handler from a closed ConfirmBox. Fixes #10597. --- Telegram/SourceFiles/boxes/confirm_box.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Telegram/SourceFiles/boxes/confirm_box.cpp b/Telegram/SourceFiles/boxes/confirm_box.cpp index 2c1b0625f3..988e96370b 100644 --- a/Telegram/SourceFiles/boxes/confirm_box.cpp +++ b/Telegram/SourceFiles/boxes/confirm_box.cpp @@ -307,6 +307,9 @@ void ConfirmBox::mouseReleaseEvent(QMouseEvent *e) { const auto guard = window(); Ui::hideLayer(); ActivateClickHandler(guard, activated, e->button()); + + // Keep the link alive, otherwise it is not activated. + crl::on_main([activated] {}); return; } BoxContent::mouseReleaseEvent(e);