Teleport cannot be cast while on the fountain, or when trying to teleport to the fountain.
Other targeted abilities may not work too. One user suggested that the abilities would work if the hero was looking towards the target of the ability.
Players are massively complaining about this on Reddit.
Probably, the bug appeared on the night of June, 18 after the release of an update to the Dota 2 client. This patch was directed against script cheaters.