diff options
author | SteVen Batten <stbatt@microsoft.com> | 2019-10-15 01:24:00 +0300 |
---|---|---|
committer | SteVen Batten <stbatt@microsoft.com> | 2019-10-15 01:24:00 +0300 |
commit | a0fd93ac46a1e05e459bac59ea67cb8591aaaa0f (patch) | |
tree | ff637254a9bb7a1c1960c8ac4cdf0f1100486433 | |
parent | 9048856bf3d89e2cbfac06353455b6e5cfcde8f2 (diff) |
dont reposition overflow menu when it doesnt move
fixes #82078
-rw-r--r-- | src/vs/base/browser/ui/menu/menubar.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/vs/base/browser/ui/menu/menubar.ts b/src/vs/base/browser/ui/menu/menubar.ts index 379da40e348..9c688e0f933 100644 --- a/src/vs/base/browser/ui/menu/menubar.ts +++ b/src/vs/base/browser/ui/menu/menubar.ts @@ -477,9 +477,11 @@ export class MenuBar extends Disposable { this.overflowMenu.actions.push(new SubmenuAction(this.menuCache[idx].label, this.menuCache[idx].actions || [])); } - DOM.removeNode(this.overflowMenu.buttonElement); - this.container.insertBefore(this.overflowMenu.buttonElement, this.menuCache[this.numMenusShown].buttonElement); - this.overflowMenu.buttonElement.style.visibility = 'visible'; + if (this.overflowMenu.buttonElement.nextElementSibling !== this.menuCache[this.numMenusShown].buttonElement) { + DOM.removeNode(this.overflowMenu.buttonElement); + this.container.insertBefore(this.overflowMenu.buttonElement, this.menuCache[this.numMenusShown].buttonElement); + this.overflowMenu.buttonElement.style.visibility = 'visible'; + } } else { DOM.removeNode(this.overflowMenu.buttonElement); this.container.appendChild(this.overflowMenu.buttonElement); |