Fixed that the edit window got selected when finding a widget for dragging.