retejs / context-menu-plugin

https://retejs.org
MIT License
11 stars 43 forks source link

`TypeError: y is undefined` when context menu opens #42

Closed elmopl closed 1 year ago

elmopl commented 3 years ago

I have the smallest example I could to reproduce issue:

<html>
    <head>
        <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
        <script src="https://cdn.jsdelivr.net/npm/rete@1.4.5-rc.1/build/rete.min.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/rete-vue-render-plugin@0.5.0/build/vue-render-plugin.min.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/rete-connection-plugin@0.9.0/build/connection-plugin.min.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/rete-context-menu-plugin@0.6.0-rc.1/build/context-menu-plugin.min.js"></script>

        <script>
            document.addEventListener('DOMContentLoaded', () => {
                const div = document.getElementById('editor');
                console.log(div);
                const editor = new Rete.NodeEditor('test@0.1.0', div);
                editor.use(ConnectionPlugin.default);
                editor.use(VueRenderPlugin.default);
                editor.use(ContextMenuPlugin.default, {items: ["test1", "test2"]});
            });
        </script>
    </head>
    <body>
        <div id="editor" style="width: 100%; height: 80em; background-color: lightgrey;"></div>
    </body>
<html>

When I load this html in my browser and right-click on editor space I get:

TypeError: y is undefined
    mounted debounceHide.js:18
    He vue@2:6
    Yt vue@2:6
    insert vue@2:6
    k vue@2:6
    zi vue@2:6
    _update vue@2:6
    r vue@2:6
    get vue@2:6
    fn vue@2:6
    mount vue@2:6
    $mount vue@2:6
    $mount vue@2:6
    i index.js:13
    p main-menu.js:5
    install index.js:43
    value emitter.ts:29
    value emitter.ts:28
    o index.ts:28
    o index.ts:28
    n editor.ts:23
    <anonymous> test.html:13
    EventListener.handleEvent* test.html:10
vue@2:6:11752

What am I missing?

Hatead1 commented 3 years ago

lodash-es

rete-js[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.