fix: fix zIndex

This commit is contained in:
fantasticit 2022-03-22 13:52:29 +08:00
parent 9bda18a4e5
commit fda147c492
7 changed files with 21 additions and 11 deletions

View File

@ -5,7 +5,11 @@
flex-direction: column;
> header {
position: relative;
z-index: 110;
background-color: var(--semi-color-nav-bg);
height: 60px;
> div {
overflow: auto;
}
@ -27,12 +31,13 @@
> header {
position: relative;
z-index: 10001;
z-index: 110;
height: 50px;
padding: 0 24px;
display: flex;
align-items: center;
overflow: hidden;
background-color: var(--semi-color-nav-bg);
border-bottom: 1px solid var(--semi-color-border);
&.isStandardWidth {

View File

@ -5,7 +5,11 @@
flex-direction: column;
> header {
position: relative;
z-index: 110;
background-color: var(--semi-color-nav-bg);
height: 60px;
> div {
overflow: auto;
}
@ -27,12 +31,13 @@
> header {
position: relative;
z-index: 10001;
z-index: 110;
height: 50px;
padding: 0 24px;
display: flex;
align-items: center;
overflow: hidden;
background-color: var(--semi-color-nav-bg);
border-bottom: 1px solid var(--semi-color-border);
&.isStandardWidth {

View File

@ -27,7 +27,7 @@ export const TableCell = BuiltInTableCell.extend({
new FloatMenuView({
editor: this.editor,
tippyOptions: {
zIndex: 10000,
zIndex: 100,
offset: [-28, 0],
},
shouldShow: ({ editor }, floatMenuView) => {

View File

@ -19,7 +19,7 @@ export const TableHeader = BuiltInTableHeader.extend({
new FloatMenuView({
editor: this.editor,
tippyOptions: {
zIndex: 10000,
zIndex: 100,
},
shouldShow: ({ editor }) => {
if (!editor.isEditable) {

View File

@ -84,7 +84,7 @@ export class BubbleMenuView {
this.view.dom.addEventListener('dragstart', this.dragstartHandler);
this.editor.on('focus', this.focusHandler);
this.editor.on('blur', this.blurHandler);
this.tippyOptions = tippyOptions;
this.tippyOptions = tippyOptions || {};
// Detaches menu content from its current parent
this.element.remove();
this.element.style.visibility = 'visible';
@ -133,7 +133,7 @@ export class BubbleMenuView {
trigger: 'manual',
placement: 'top',
hideOnClick: 'toggle',
...this.tippyOptions,
...Object.assign({ zIndex: 99 }, this.tippyOptions),
});
// maybe we have to hide tippy on its own blur event as well

View File

@ -47,7 +47,7 @@ export class FloatMenuView {
constructor(props: FloatMenuViewOptions) {
this.editor = props.editor;
this.shouldShow = props.shouldShow;
this.tippyOptions = props.tippyOptions;
this.tippyOptions = props.tippyOptions || {};
if (props.getReferenceClientRect) {
this.getReferenceClientRect = props.getReferenceClientRect;
}
@ -76,7 +76,7 @@ export class FloatMenuView {
trigger: 'manual',
placement: 'top',
hideOnClick: 'toggle',
...(this.tippyOptions ?? {}),
...Object.assign({ zIndex: 99 }, this.tippyOptions),
});
}

View File

@ -284,7 +284,7 @@
.grip-column {
position: absolute;
z-index: 10000;
z-index: 10;
display: block;
width: 100%;
height: 0.7em;
@ -302,7 +302,7 @@
.grip-row {
position: absolute;
z-index: 10000;
z-index: 10;
display: block;
height: 100%;
width: 0.7em;
@ -320,7 +320,7 @@
.grip-table {
position: absolute;
z-index: 10000;
z-index: 10;
display: block;
width: 0.8em;
height: 0.8em;