Issue #1947444 by ericduran: Fixed Do not always apply the jQuery UI dialog patch.