Dismiss (x) or comparable on modal windows, e.g. share

When I bring up the share dialog, there’s not an obvious way to dismiss it after using it. I need to learn that clicking outside the window dismisses it. I suggest adding the small affordance of an (x) in the upper right corner for dismissal. On mobile, in particular, this takes up most of the screen, making the outer area a small touch target as well (if you know enough to use it).