When I was at UC Davis I used to regularly ride to campus and home with no hands (c'mon stoplight, turn green, TURN GREEN!) on a MTB.
I can do it for short periods on my road bike, but it definitely feels less stable. Recently I was tiaking off a wind breaker while riding with no hands and hit a small pothole.
I managed to grab the bars in time and didn't go down, though my boys became painfully acquainted with the top tube