title: Get selected text position and place an element next to it
body: <h2>tl;dr</h2>
  <p>The idea is to allow a user to mark any text and see menu pop-up just next to the selection, with possible actions to apply to the selected text.</p>
  <hr />
  <p>I need to position an absolute positioned button next to user's selected text.</p>
  <p>I'm binding a <strong>mouseup event</strong> to the Document, and getting the selected text, but I'm currently out of ideas on how to know where the actual selection is positioned, without wrapping it in some element, because selection of text can be across several elements, and it would mess the structure if I would wrap it.</p>