From e69158d9b2741a866a3ed8861523f4b0ea702db3 Mon Sep 17 00:00:00 2001 From: Anthony Dresser Date: Tue, 19 Jun 2018 12:22:25 -0700 Subject: [PATCH] Swallow error on context view when disposing children (#1663) * swallow error on context view when disposing children * fix edit comment --- src/vs/base/browser/ui/selectBox/selectBoxCustom.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts b/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts index b8d206ce07..1a264a35d1 100644 --- a/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts +++ b/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts @@ -397,8 +397,16 @@ export class SelectBoxList implements ISelectBoxDelegate, IDelegate container.removeChild(this.selectDropDownContainer) // remove to take out the CSS rules we add + dispose: () => { + try { + container.removeChild(this.selectDropDownContainer); // remove to take out the CSS rules we add + } catch(e) { + // if this fails it means it is already removed + } + } }; }