diff --git a/Telegram/SourceFiles/boxes/confirm_box.cpp b/Telegram/SourceFiles/boxes/confirm_box.cpp index 988e96370..90a72d84e 100644 --- a/Telegram/SourceFiles/boxes/confirm_box.cpp +++ b/Telegram/SourceFiles/boxes/confirm_box.cpp @@ -304,12 +304,10 @@ void ConfirmBox::mouseReleaseEvent(QMouseEvent *e) { _lastMousePos = e->globalPos(); updateHover(); if (const auto activated = ClickHandler::unpressed()) { - const auto guard = window(); - Ui::hideLayer(); - ActivateClickHandler(guard, activated, e->button()); - - // Keep the link alive, otherwise it is not activated. - crl::on_main([activated] {}); + ActivateClickHandler(window(), activated, e->button()); + crl::on_main(this, [=] { + closeBox(); + }); return; } BoxContent::mouseReleaseEvent(e);