Sharing dropdown bug fixes

There were a few bugs in the sharing dropdown that caused a bad UX with either the dropdown closing too early or having the whole view scroll up on click.

See commit summary for details.