@@ -143,6 +143,7 @@ Preference key for persisting the maximize state across reloads.
143143 * [ .show()] ( #Panel+show )
144144 * [ .addToTabBar()] ( #Panel+addToTabBar )
145145 * [ .hide()] ( #Panel+hide )
146+ * [ .closeTab()] ( #Panel+closeTab )
146147 * [ .focus()] ( #Panel+focus ) ⇒ <code >boolean</code >
147148 * [ .setVisible(visible)] ( #Panel+setVisible )
148149 * [ .setTitle(newTitle)] ( #Panel+setTitle )
@@ -196,12 +197,12 @@ tab close button). The handler should return `true` to allow the close, or `fals
196197<a name =" Panel+requestClose " ></a >
197198
198199### panel.requestClose() ⇒ <code >Promise.< ; boolean> ; </code >
199- Requests the panel to hide , invoking the registered onCloseRequested handler first (if any).
200- If the handler returns false, the panel stays open . If it returns true or no handler is
201- registered , ` hide ()` is called.
200+ Requests this panel's tab to close , invoking the registered
201+ onCloseRequested handler first (if any) . If the handler returns false,
202+ the tab stays open. Otherwise , ` closeTab ()` is called.
202203
203204** Kind** : instance method of [ <code >Panel</code >] ( #Panel )
204- ** Returns** : <code >Promise.< ; boolean> ; </code > - Resolves to true if the panel was hidden , false if prevented.
205+ ** Returns** : <code >Promise.< ; boolean> ; </code > - Resolves to true if the tab was closed , false if prevented.
205206<a name =" Panel+show " ></a >
206207
207208### panel.show()
@@ -219,7 +220,25 @@ was collapsed by the user — avoids forcing the bottom panel open.
219220<a name =" Panel+hide " ></a >
220221
221222### panel.hide()
222- Hides the panel
223+ Hides this panel: removes its tab from the tab bar, and if this was
224+ the active tab, collapses the bottom panel container. The panel stays
225+ registered — call show() to bring it back.
226+
227+ For tab-bar UX where closing the active tab should switch to the next
228+ sibling tab (like clicking the X on a tab), use closeTab() instead.
229+ For permanent removal, use destroy().
230+
231+ ** Kind** : instance method of [ <code >Panel</code >] ( #Panel )
232+ <a name =" Panel+closeTab " ></a >
233+
234+ ### panel.closeTab()
235+ Closes this tab: removes its tab from the tab bar. If this was the
236+ active tab, switches to the next sibling tab; if no other tab is open,
237+ collapses the bottom panel container instead. The panel stays
238+ registered — call show() to bring it back.
239+
240+ For a programmatic hide that always collapses (no auto-switch to a
241+ sibling tab), use hide(). For permanent removal, use destroy().
223242
224243** Kind** : instance method of [ <code >Panel</code >] ( #Panel )
225244<a name =" Panel+focus " ></a >
0 commit comments