The simplest solution is to move the dialog to a parallel loop, as in the attached modified vi.
A more elaborated solution would be to use the vi server to launch a dialog vi, independently of the main. But that's another story...
CC
Chilly Charly (aka CC)