Various bug fixes for popup for edges

This fixes the click area for node and edge. This is now ready to be
tested.