Giter Club home page Giter Club logo

Comments (8)

ahkohd avatar ahkohd commented on May 18, 2024 1

Turns out, you don't need a workaround. This worked but what the heck!

let titleBar = new Titlebar({
    backgroundColor: Color.fromHex('#ECECEC')
});

const menu = new Menu();
menu.append(new MenuItem({
    label: 'Item 1',
    submenu: [
        {
            label: 'Subitem 1',
            click: () => {
                console.log('Click on subitem 1');
                 titlebar.updateMenu(menu);
             }
        },
        {
            type: 'separator'
        }
    ]
}));

titlebar.updateMenu(menu);

Just place titlebar.updateMenu(menu); inside your click handler function, preferably at the end of the function. Weird!

from custom-electron-titlebar.

amanharwara avatar amanharwara commented on May 18, 2024

Has there been any progress on this issue?

from custom-electron-titlebar.

AlexTorresDev avatar AlexTorresDev commented on May 18, 2024

Has there been any progress on this issue?

No I have had time to work on this issue.

If anyone could have time to collaborate on this issue, I would appreciate it.

from custom-electron-titlebar.

sagargurtu avatar sagargurtu commented on May 18, 2024

Is there any workaround for this issue?

from custom-electron-titlebar.

AlexTorresDev avatar AlexTorresDev commented on May 18, 2024

I'm currently working on solving this issue.

from custom-electron-titlebar.

robgonnella avatar robgonnella commented on May 18, 2024

Not sure if this is the best approach but I have a working solution here: #47

from custom-electron-titlebar.

AlexTorresDev avatar AlexTorresDev commented on May 18, 2024

Resolved on #47

from custom-electron-titlebar.

jonas-johansson avatar jonas-johansson commented on May 18, 2024

I have this issue in 3.2.2-hotfix62 when clicking a submenu item. So clicking File -> Foo -> Bar executes the click function but the menu stays visible. Clicking File -> Cheese on the other hand executes the click function and closes the menu as expected.

from custom-electron-titlebar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.