[MM-38535] Overlay drag region with clickable area when menu is open (#1738)

This commit is contained in:
Devin Binnie 2021-09-20 05:40:27 -04:00 committed by GitHub
parent b25ccfeecf
commit c12c9fb2e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 1 deletions

View file

@ -330,6 +330,7 @@ export default class MainPage extends React.PureComponent<Props, State> {
onCloseTab={this.handleCloseTab}
onDrop={this.handleDragAndDrop}
tabsDisabled={this.state.modalOpen}
isMenuOpen={this.state.isMenuOpen}
/>
);

View file

@ -24,6 +24,7 @@ type Props = {
mentionCounts: Record<string, number>;
onDrop: (result: DropResult) => void;
tabsDisabled?: boolean;
isMenuOpen?: boolean;
};
function getStyle(style?: DraggingStyle | NotDraggingStyle) {
@ -151,12 +152,15 @@ export default class TabBar extends React.PureComponent<Props> {
{(provided) => (
<Nav
ref={provided.innerRef}
className={`TabBar${this.props.isDarkMode ? ' darkMode' : ''}`}
className={classNames('TabBar', {
darkMode: this.props.isDarkMode,
})}
id={this.props.id}
variant='tabs'
{...provided.droppableProps}
>
{tabs}
{this.props.isMenuOpen ? <span className='TabBar-nonDrag'/> : null}
{provided.placeholder}
</Nav>
)}

View file

@ -9,6 +9,11 @@
padding: 6px 8px;
}
.TabBar-nonDrag {
flex-grow: 1;
-webkit-app-region: no-drag;
}
.TabBar .teamTabItem span {
flex: 0 1 auto;
overflow: hidden;