Skip to content

Commit 2aa66f5

Browse files
committed
fix hide panel
1 parent 8b302a3 commit 2aa66f5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

apps/remix-ide/src/app/components/right-side-panel.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ export class RightSidePanel extends AbstractPanel {
220220
return this.hiddenPlugin
221221
}
222222

223-
togglePanel () {
223+
async togglePanel () {
224224
const pinnedPanel = document.querySelector('#right-side-panel')
225225
// Persist the hidden state to panelStates, preserving pluginProfile
226226
const panelStates = JSON.parse(window.localStorage.getItem('panelStates') || '{}')
@@ -254,6 +254,11 @@ export class RightSidePanel extends AbstractPanel {
254254
this.emit('rightSidePanelShown')
255255
this.events.emit('rightSidePanelShown')
256256
} else {
257+
// If the panel is maximized, restore all panels before hiding
258+
if (this.isMaximized) {
259+
await this.maximizePanel() // This will toggle and restore the panels
260+
}
261+
257262
this.isHidden = true
258263
this.hiddenPlugin = pluginProfile
259264
pinnedPanel?.classList.add('d-none')

0 commit comments

Comments
 (0)