Document click event of diagram widget