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
OS X does this for us, but Windows and Linux does not. There's absolutely no reason to have leading and trailing separators and it's difficult to not introduce leading/trailing separators in complex context menus where multiple actors modify it. Especially when using the visible option to toggle items as the separator is not connected to that. I think Electron should handle this for us.
If the visible attribute also worked on separators then it would be trivial for us to hide them when we are hiding other items in the menu, which is often why we end up with leading/trailing separators. Just a thought.
As far as I can tell it's not documented that the visible property doesn't work on separators, would be great to get that in the docs if it is the intended behavior and not a bug. Also, you can use visible to remove an entire submenu from OSX, but Windows does not respect that.
Activity
zcbenz commentedon Jun 6, 2016
I'm not opposed to this, but I'm not sure if there are use cases that do need leading and trailing separators.
sindresorhus commentedon Jun 6, 2016
@zcbenz OS X removes them, so if there are any use-cases, which I find extremely unlikely, it wouldn't work cross-platform anyways.
Scazzino commentedon May 6, 2017
If the visible attribute also worked on separators then it would be trivial for us to hide them when we are hiding other items in the menu, which is often why we end up with leading/trailing separators. Just a thought.
abhigyank commentedon Jun 26, 2020
This seems to have come back in Windows and Linux, can we re-open this?
codebykat commentedon Jul 31, 2020
As far as I can tell it's not documented that the
visibleproperty doesn't work on separators, would be great to get that in the docs if it is the intended behavior and not a bug. Also, you can usevisibleto remove an entire submenu from OSX, but Windows does not respect that.MoConWu commentedon Jan 26, 2024
This seems to have come back in Windows and Linux, can we re-open this?
Electron,v28.2.0