You must be mistaken about this "rotation." This would be a rearrangement, and in these circumstances, it doesn't happen. For instance, methylenation
of 2,3-dihydroxy benzaldehyde would simply give 2,3-methylenedioxybenzaldehyde. Piperonal can be synthesized by methylenating
3,4-dihydroxybenzaldehyde (catechualdehyde).
The mechanism is just a regular SN2 reaction at each phenol oxygen. |