Dashboard collapse widget on click

in dashboard–>
how to auto-collapse a widget when user clicks on a field ?