2. It is forbidden to open a door or a window which is directly opposite
and close to a burning candle, because the wind may extinguish the flame
(1). One may, however, close such a door or window. It is forbidden both to
open and to close the door of an oven that has fire (or burning coals) in
it, for by doing so one either causes the fire to burn [better] or
extinguishes it [slightly](2).
(1) If there is no wind outside, one may be lenient in pressing
circumstances, only if one opens the door or window slowly. Opening the
door or window quickly, even if there is no wind, may cause a draft that
will put out the flame. The basic principle is that one should refrain from
doing anything that is likely to cause the flame to be extinguished (See
the Mishna Berura 277:2-3 and Biur Halacha).
(2) This law is also relevant in a modern context, with regard to opening
and closing the doors of refrigerators and ovens that are controlled by
thermostats. A competent Halachic authority should be consulted.