Ok, I see what's your goal... you haven't considered the possibility of actually having different web blocks for the display vs editing modes? I guess that could simplify things a lot.
From your explanation, it seems like you want the "capturing" behaviour... where the outermost element captures the event, handles it and may or may not pass it on for other inner elements to potentially capture and so forth.
You could try changing the behaviour of the outer link (around your WebBlock A) to be capture (by adding an event listener using capture) this should be captured before the click gets propagated down to the elements inside WebBlock A. You will still need to use JavaScript for this one (and eventually have a hidden Button to trigger some OutSystems server action).