You're whirring along at a good clip, the story is playing out in your mind just ahead of your fingers on the keyboard. Events happen that need to happen, and people act out their fictional lives at your command. Suddenly, you realize that you don't know if Character A could have done as he did. There will have to be research, and the question is, do you do it now, or do you mark that passage and come back to it?
Can't give a definite answer, because I'm of two minds. Sometimes I stop writing and do the research right then. The advantage is that I know it works, and the rest of my plot isn't going to be derailed later when I discover that a search warrant wouldn't be given at that point or a particular device hadn't been invented at that time. It's good to solve those sorts of questions right away.
On the other hand, a pause in writing when things are going well is dangerous. If I go off into research, I'm likely to spend way too long at it, because everything I find interests me, even if it doesn't pertain. So I end up spending an hour or two reading up on glass-blowing, a fascinating art that has NOTHING to do with my story. If I need a name for a minor river in northern England or a homely task that some housewife might be working at in the evening as she tells her children stories, researching that shouldn't interrupt a plot that's moving ahead in my mind.
So like any good Methodist, my life is moderation and my research method is the same. If the writing is going well and the point at issue is minor, I add some ***s to the MS so I can find the spot later and dig for a good little nugget. If it's a major point, I stop writing, no matter how well the plot's moving. Even if it feels good to be ticking along so well, there's no advantage if you're going in the wrong direction.