Fix text selection when moving nodes