Issue #2559241 by droplet, tic2000: Closing an #ajax dialog triggers Javascript errors when scrolling