Fix crash on right click in ConfirmBox with link.

This commit is contained in:
John Preston 2021-04-13 19:02:17 +04:00
parent be74a391ba
commit 3e5e0cb9df
1 changed files with 4 additions and 6 deletions

View File

@ -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);