fix(qa): verify private investor continuity across dossiers

This commit is contained in:
2026-11-20 19:20:03 +02:00
parent e299afdae4
commit 15e15d0bfd
13 changed files with 563 additions and 16 deletions
@@ -41,6 +41,7 @@ export function InvestmentHelpGuide({
const [active, setActive] = useState<string | null>(null);
const [automatic, setAutomatic] = useState(true);
const paused = useRef(false);
const pointerFocus = useRef(false);
const key = helpPreferenceKey(user, flow);
const firstCode = steps.some((step) => step.code === initialCode)
? initialCode
@@ -151,8 +152,24 @@ export function InvestmentHelpGuide({
<div
ref={root}
className="space-y-5"
onFocusCapture={(event) => orient(event.target)}
onClickCapture={(event) => orient(event.target)}
onPointerDownCapture={() => {
pointerFocus.current = true;
}}
onPointerUpCapture={() => {
pointerFocus.current = false;
}}
onPointerCancelCapture={() => {
pointerFocus.current = false;
}}
onFocusCapture={(event) => {
// Opening inline help during pointer focus can move the
// target between pointerdown and click, losing the action.
if (!pointerFocus.current) orient(event.target);
}}
onClickCapture={(event) => {
pointerFocus.current = false;
orient(event.target);
}}
onKeyDown={(event) => {
if (
event.key === 'Escape' &&