Fetching details from the dictionary...
no sooner than; as soon as; immediately after
at the thought of; when I think about
座ったかと思うとすぐ立ち上がった。
No sooner had she sat down than she stood up again.
電話が鳴ったかと思うともう切れていた。
No sooner had the phone rung than it had already gone silent.
出かけたかと思うと忘れ物を取りに戻ってきた。
No sooner had he left than he came back to get something he'd forgotten.