Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/dashboard-core-plugins/src/panels/NotebookPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -957,9 +957,12 @@ class NotebookPanel extends Component<NotebookPanelProps, NotebookPanelState> {
});
}

handlePanelTabClick(): void {
handlePanelTabClick(e: MouseEvent): void {
Comment thread
mattrunyon marked this conversation as resolved.
Outdated
log.debug('handlePanelTabClick');
this.focus();
if (e.detail === 2) {
this.removePreviewStatus();
}
}

/**
Expand Down
7 changes: 3 additions & 4 deletions packages/golden-layout/src/controls/Tab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ export default class Tab {
isComponent(this.contentItem)
) {
this.header.parent.setActiveContentItem(this.contentItem);
this.contentItem.container.emit('tabClicked');
} else if (
isComponent(this.contentItem) &&
!this.contentItem.container._contentElement[0].contains(
Expand All @@ -246,10 +245,10 @@ export default class Tab {
// if no focus inside put focus onto the container
// so focusin always fires for tabclicks
this.contentItem.container._contentElement.focus();
}

// still emit tab clicked event, so panels can also
// do it's own focus handling if desired
this.contentItem.container.emit('tabClicked');
if (isComponent(this.contentItem)) {
this.contentItem.container.emit('tabClicked', event);
}

// might have been called from the dropdown
Expand Down