Responding to a creature's activated ability being activated by moving Detainment Spell onto that creature won't affect the ability that was just activated.
Detainment Spell prevents mana abilities of the enchanted creature from being activated.
Morph isn't an activated ability, so Detainment Spell doesn't prevent face-down creatures from being able to turn face up.