Don't allow drag-and-drop of files/folders when a modal dialog is showing.

This fixes issue #5196.