diff --git a/packages/survey-creator-core/src/components/action-container-view-model.ts b/packages/survey-creator-core/src/components/action-container-view-model.ts index 661c0ace69..0f6b317b37 100644 --- a/packages/survey-creator-core/src/components/action-container-view-model.ts +++ b/packages/survey-creator-core/src/components/action-container-view-model.ts @@ -70,6 +70,9 @@ export class SurveyElementAdornerBase e super.dispose(); this.detachElement(this.surveyElement); this.actionContainer.dispose(); + this.creator.sidebar.onPropertyChanged.remove(this.sidebarFlyoutModeChangedFunc); + this.selectedPropPageFunc = undefined; + this.sidebarFlyoutModeChangedFunc = undefined; } protected onElementSelectedChanged(isSelected: boolean): void { if (!isSelected) return; diff --git a/packages/survey-creator-core/src/components/tabs/designer-plugin.ts b/packages/survey-creator-core/src/components/tabs/designer-plugin.ts index 88fce2cdc6..879dfc6856 100644 --- a/packages/survey-creator-core/src/components/tabs/designer-plugin.ts +++ b/packages/survey-creator-core/src/components/tabs/designer-plugin.ts @@ -125,12 +125,8 @@ export class TabDesignerPlugin implements ICreatorPlugin { action: () => { this.selectSurvey(); }, - active: new ComputedUpdater(() => { - return notShortCircuitAnd(this.creator.sidebar.activeTab === this.propertyGridTab.id, this.isSurveySelected); - }), - pressed: new ComputedUpdater(() => { - return notShortCircuitAnd(this.creator.sidebar.activeTab === this.propertyGridTab.id, this.isSurveySelected); - }), + active: this.isSettingsActive, + pressed: this.isSettingsActive, visible: this.createVisibleUpdater(), locTitleName: "ed.surveySettings", locTooltipName: "ed.surveySettingsTooltip", diff --git a/packages/survey-creator-react/src/adorners/Page.tsx b/packages/survey-creator-react/src/adorners/Page.tsx index 60a0333247..61bc755e4c 100644 --- a/packages/survey-creator-react/src/adorners/Page.tsx +++ b/packages/survey-creator-react/src/adorners/Page.tsx @@ -56,6 +56,7 @@ export class CreatorSurveyPageComponent extends CreatorModelElement< } componentWillUnmount() { super.componentWillUnmount(); + this.model.onPageSelectedCallback = undefined; this.model.dispose(); } protected canRender(): boolean {