Thanks for your far from st*pid suggestion, Chad. I tried quickly holding the tray shut with my finger, held it until a little whirring sound finished, then it stayed shut unaided and the CD played fine. The tray now stays shut when it's meant to. It's a mystery to me, but it worked!
tsgunnell - thanks for your posting, which I've only just seen (I haven't been here for a month or two). I'll try it if the tray goes funny again, and might have a look anyway if I can without damaging it. Dust is a distinct possibility in my home. I wonder if the above brute-force method might have dislodged some dirt on the leaf switch!
Hilary James, June 2006