Skip to content

Commit 4508975

Browse files
[Bug fix] Plotly modebar appears above modals (getredash#3799)
1 parent c76955b commit 4508975

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

client/app/assets/less/ant.less

+17-4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,22 @@
3535
@import "~antd/lib/notification/style/index";
3636
@import 'inc/ant-variables';
3737

38+
// Increase z-indexes to avoid conflicts with some other libraries (e.g. Plotly)
39+
@zindex-modal: 2000;
40+
@zindex-modal-mask: 2000;
41+
@zindex-message: 2010;
42+
@zindex-notification: 2010;
43+
@zindex-popover: 2030;
44+
@zindex-dropdown: 2050;
45+
@zindex-picker: 2050;
46+
@zindex-tooltip: 2060;
47+
48+
.@{drawer-prefix-cls} {
49+
&.help-drawer {
50+
z-index: 3000; // help drawer should be topmost
51+
}
52+
}
53+
3854
// Remove bold in labels for Ant checkboxes and radio buttons
3955
.ant-checkbox-wrapper,
4056
.ant-radio-wrapper {
@@ -59,6 +75,7 @@
5975
}
6076

6177
// Fix for Ant dropdowns when they are used in Boootstrap modals
78+
// ANGULAR_REMOVE_ME Remove when all dialogs will be migrated to React (also search and remove usages)
6279
.ant-dropdown-in-bootstrap-modal {
6380
z-index: 1050;
6481
}
@@ -288,10 +305,6 @@
288305
margin-top: 4px;
289306
}
290307

291-
.ant-popover {
292-
z-index: 1000; // make sure it doesn't cover drawer
293-
}
294-
295308
// Notification overrides
296309
.@{notification-prefix-cls} {
297310
// vertical centering

client/app/components/dashboards/AddWidgetDialog.jsx

-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ class AddWidgetDialog extends React.Component {
113113
className="w-100"
114114
defaultValue={first(this.state.selectedQuery.visualizations).id}
115115
onChange={visualizationId => this.selectVisualization(this.state.selectedQuery, visualizationId)}
116-
dropdownClassName="ant-dropdown-in-bootstrap-modal"
117116
>
118117
{visualizationGroups.map(visualizations => (
119118
<OptGroup label={visualizations[0].type} key={visualizations[0].type}>

0 commit comments

Comments
 (0)