Is it a bad idea to turn off your car when it's in drive?

I am just wondering, what happens if you turn off your car when you are stopped, but the transmission is in drive? I am wondering specifically about a CVT.

Thanks

Why would one do this? In order to start the car again you have to be in neutral or park anyway, no?

No harm done.

Had one car did not like that, If you let it run less than 3 minutes it was toast, crank and no start. till many hours on charger and multiple cranks, never tried to figure it out, just let it run 3 minutes or drive around the block. My regular mechanics had no idea either, and they were surprised it eventually started, a couple of years ago it was, perhaps the heet helped but starting fluid did nothing. Cross your fingers and prey, my best bet

It might not be a good habit to have but it wouldn’t damage anything.

@jdmere I have accidentally made this mistake a few times, but never before on a CVT. I figured it wouldn’t be a problem, regardless of the transmission.

As long as you are stopped I don’t see that causing any mechanical problem. If there was anything of concern, it would probably be what @Barkydog mentions above, some kind of electrical glitch. The engineers who designed how all the systems work together might not anticipate a driver doing this, so transmission modules which are normally powered down when the key is turned off in park or neutral might remain powered up if the key is turned off in drive, and that could run down the battery.

Just don’t take your foot off the brake. If in drive and you take your foot of the pedal the car may start rolling and you’ll have a difficult time stopping it without the engine running.