How did Buddha deal with people that were sexually attracted to him? Is there any known case, where someone was sexually attracted to Buddha?
I recall there is a story (which is probably not from the Pali suttas but from a commentary) where a woman was in love with the Buddha so the Buddha used psychic power to make his appearance age before the woman, similar to the commentary story below:

Janapadakalyāṇī became a nun because her eldest brother (the Buddha) had renounced his kingdom to become a monk, his son Rāhula had become
a monk, her own husband, Nanda, had become a monk, and her mother, had
all gone forth. Due to her great beauty, she became known as Rūpanandā
Therī. Hearing that the Buddha deprecated beauty, she avoided visiting
him. However, hearing the lavish praise of the Buddha by the nuns and
women devotees, she wished to see and hear the Buddha, so one day went
with the other nuns, sitting behind them. The Buddha used his psychic
powers to create a vision of a beautiful young woman fanning him.
Rūpanandā was captivated by her beauty. The Buddha then caused the
young woman to age gradually, slowly taking on the form of an old
woman, then one dying in agony. Finally he made her body became a
bloated corpse, pecked at by crows. Becoming thoroughly disgusted,
Rūpanandā reflected that her own body was the same. Then the Buddha
uttered the above verse and Rūpanandā gained Arahantship.
http://www.aimwell.org/11-jara.html