Stop propagation of click events on the background

This is to prevent the bubbled-up clicks from triggering changes behind the modal overlay (e.g., the auto-closing of open dropdowns).
Merge pull request #4444 from gaborluk/patch-1

Stop propagation of click events on the background