This comment and the one above really make it clear that we're handling click events in this function, especially middle clicks right here.