Yes it is legal to travel in Ontario with propane or electric appliances running. However the same ministry page states that all sources of ignition must be turned off while refuelling. There is no differentiation between gas and diesel.
We ran our fridge on auto over the last 3 weeks in our new Jayco Select 28U during our first shakedown trip. No problems at all going from Ottawa Ontario through the Maritimes and back.
2012 Chev 4x4 Crew Cab 5.3l 3.42 trailer package
2011 Jayco Select 28U
gone 2003 Chev 4x4 5.3 Extended cab
gone 1991 Award Classic 30