This means that right when you were about to do something, something else happened. It was often something bad or annoying.
、。
Just as I was about to leave the house, it suddenly started pouring with rain.
、。
Just as I was about to save the important file, the computer froze.
、「」、。
Just as I worked up the courage to confess my feelings, she told me 'let's just be friends', and I was left speechless.
、に。
Just as I was about to score a goal, the opposing defender stole the ball from me.
に、、。
Just as I was finally about to board the plane, I realized I had lost my boarding pass and turned pale.