Having played a lot of games in goal (not a keeper but we only had one and he was notorious for not turning up if he had a hangover ..!) any movement in front of you is in your vision and will affect you. The classic example is when an in swinging cross comes in towards the far post and you don't know whether to dive and keep it out or stand up in case an attacker (or defender) gets a touch. That doesn't mean that a player stood in a position where he might head it is committing an offside offence, but as a keeper that is impossible for you to know.
The crucial thing here is, as is the case with the OP, the presence of the attacking player doesn't prevent the keeper from playing the ball. It almost certainly puts doubts in his minds, but under the current law that isn't enough to make it offside.