updated to send information about clicked element when using the context menu