Re-enable the event trap if a context menu is displayed

A contextmenu event is fired instead of a mouseup event, therefore
both these events need to be listened for to ensure the event trap
becomes re-enabled.