replaced the invisible div with an event listener to the document element