[CTX-1305] Stop the loop when reach the main window or when the supervie...

...w is nil, which means that the view is not visible, then makes no sense to be used by a DragDrop framework.