Open
Description
Using a registered event similar to this:
$.contextMenu({
selector: ".foo",
build: function($triggerElement, e){
console.log(window.getSelection().getRangeAt(0));
return {zIndex: 10, items: getMenuItems(), reposition: false};
}
})
If I repeatedly right-click (as in #104) on a text element, the logged message remains the same; window.getSelection()
is not updated. This is despite having reposition: false
.
I tested this with the browser's native context menu:
document.addEventListener("selectionchange", function(e) {
console.log(window.getSelection().getRangeAt(0));
});
and that does refresh.
using jQuery.contextMenu v2.7.0, Chrome 67
Metadata
Metadata
Assignees
Labels
No labels