Fix possible javascript error on drag-n-drop (#1489560)