JavaScript context menu for selected text; Insert a source reference in copied text / JavaScript-Kontextmenü für ausgewählten Text; Fügt eine Quellenreferenz in kopierten Text ein
Because the mouseup listener is added on the container, if the selection ends slightly outside it, it won't register.Not sure if there's a good solution that doesn't involve the user adding a wrapper element.