Fixed a bug where a click event would be raise when dragging a node