I found what is causing the problems: the 'Editable' property is set to 'off'. Now the question is: how can I have the 'Editable' property set to 'off', and still have the pure black background?
I found a workaround to this problem: create an empty label with black background, and place it behind the uieditfield. Is there a more elegant solution to this problem?