You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.
I found that moving the menu initialization to the timeout function worked instead of the documented version. Otherwise it does not show any suggestions.
My suggestion to be changed on the docs:
window.addEventListener('contextmenu', function(e) {
// Only show the context menu in text editors.
if (!e.target.closest('textarea, input, [contenteditable="true"]')) return;
// The 'contextmenu' event is emitted after 'selectionchange' has fired but possibly before the
// visible selection has changed. Try to wait to show the menu until after that, otherwise the
// visible selection will update after the menu dismisses and look weird.
setTimeout(function() {
var menu = buildEditorContextMenu();
menu.popup(remote.getCurrentWindow());
}, 30);
});
The text was updated successfully, but these errors were encountered:
I found that moving the menu initialization to the timeout function worked instead of the documented version. Otherwise it does not show any suggestions.
My suggestion to be changed on the docs:
The text was updated successfully, but these errors were encountered: