From 795f07fd8a1727d249292399691eb2121a5beb23 Mon Sep 17 00:00:00 2001 From: r-zakarya <82443831+r-zakarya@users.noreply.github.com> Date: Fri, 21 Aug 2026 16:38:26 +0100 Subject: [PATCH] fix(android): Cancel works, because lastDetail is now written It was introduced with two readers and no writer. Cancel called renderDetail(null), which threw on d.rows and did nothing at all - and editDone, which uses it to hand control back after a refusal, was dead the same way. That is why the successive fixes for "Cancel does not respond" changed nothing: they all ended in the same silent throw. Assigned where a detail is drawn, which is the one place that knows it. --- android-client/web/app.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/android-client/web/app.html b/android-client/web/app.html index 6c1b991..0d2d239 100644 --- a/android-client/web/app.html +++ b/android-client/web/app.html @@ -586,9 +586,17 @@ document.getElementById('qx').addEventListener('click', function () { var detailRows = []; // Le dernier detail recu, pour redessiner la ligne apres une annulation sans // avoir a le redemander a Delphi. +// +// IL FAUT L'ECRIRE. Il a ete introduit avec ses deux lecteurs et aucun +// ecrivain : Cancel appelait donc renderDetail(null), qui levait sur d.rows et +// ne faisait rien du tout. editDone, qui s'en sert aussi pour rendre la main +// apres un refus, etait mort de la meme facon - ce qui explique pourquoi les +// corrections successives de "Cancel ne repond pas" n'y changeaient rien. var lastDetail = null; function renderDetail(d) { + if (!d) return; + lastDetail = d; detailRows = d.rows || []; document.getElementById('dtitle').textContent = d.title || ''; var html = '', i;