[MM-38535] Overlay drag region with clickable area when menu is open (#1738)
This commit is contained in:
parent
b25ccfeecf
commit
c12c9fb2e4
|
@ -330,6 +330,7 @@ export default class MainPage extends React.PureComponent<Props, State> {
|
||||||
onCloseTab={this.handleCloseTab}
|
onCloseTab={this.handleCloseTab}
|
||||||
onDrop={this.handleDragAndDrop}
|
onDrop={this.handleDragAndDrop}
|
||||||
tabsDisabled={this.state.modalOpen}
|
tabsDisabled={this.state.modalOpen}
|
||||||
|
isMenuOpen={this.state.isMenuOpen}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ type Props = {
|
||||||
mentionCounts: Record<string, number>;
|
mentionCounts: Record<string, number>;
|
||||||
onDrop: (result: DropResult) => void;
|
onDrop: (result: DropResult) => void;
|
||||||
tabsDisabled?: boolean;
|
tabsDisabled?: boolean;
|
||||||
|
isMenuOpen?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
function getStyle(style?: DraggingStyle | NotDraggingStyle) {
|
function getStyle(style?: DraggingStyle | NotDraggingStyle) {
|
||||||
|
@ -151,12 +152,15 @@ export default class TabBar extends React.PureComponent<Props> {
|
||||||
{(provided) => (
|
{(provided) => (
|
||||||
<Nav
|
<Nav
|
||||||
ref={provided.innerRef}
|
ref={provided.innerRef}
|
||||||
className={`TabBar${this.props.isDarkMode ? ' darkMode' : ''}`}
|
className={classNames('TabBar', {
|
||||||
|
darkMode: this.props.isDarkMode,
|
||||||
|
})}
|
||||||
id={this.props.id}
|
id={this.props.id}
|
||||||
variant='tabs'
|
variant='tabs'
|
||||||
{...provided.droppableProps}
|
{...provided.droppableProps}
|
||||||
>
|
>
|
||||||
{tabs}
|
{tabs}
|
||||||
|
{this.props.isMenuOpen ? <span className='TabBar-nonDrag'/> : null}
|
||||||
{provided.placeholder}
|
{provided.placeholder}
|
||||||
</Nav>
|
</Nav>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -9,6 +9,11 @@
|
||||||
padding: 6px 8px;
|
padding: 6px 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.TabBar-nonDrag {
|
||||||
|
flex-grow: 1;
|
||||||
|
-webkit-app-region: no-drag;
|
||||||
|
}
|
||||||
|
|
||||||
.TabBar .teamTabItem span {
|
.TabBar .teamTabItem span {
|
||||||
flex: 0 1 auto;
|
flex: 0 1 auto;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
Loading…
Reference in a new issue