fix bugs and position on safari

master
JFH 2021-05-22 23:18:59 +02:00
parent 7a661d7bfc
commit 26fc8eeb49
4 changed files with 10 additions and 10 deletions

View File

@ -151,9 +151,9 @@ export class ExplorerButton extends HTMLElement {
break; break;
case 'disabled': case 'disabled':
if (newValue) { if (newValue) {
this.$div.classList.add('disabled'); this.$overall.classList.add('disabled');
} else { } else {
this.$div.classList.remove('disabled'); this.$overall.classList.remove('disabled');
} }
break; break;
case 'lib': case 'lib':

View File

@ -47,7 +47,6 @@ template.innerHTML = `
} }
.menu { .menu {
position: absolute; position: absolute;
top:-2px;
left:32px; left:32px;
background: none !important; background: none !important;
display:none; display:none;
@ -68,13 +67,14 @@ template.innerHTML = `
</style> </style>
<div class="overall"> <div class="overall">
<div class="menu">
<slot></slot>
</div>
<div class="menu-button"> <div class="menu-button">
<img class="button-icon" src="./images/logo.svg" alt="icon"> <img class="button-icon" src="./images/logo.svg" alt="icon">
<div class="handle"></div> <div class="handle"></div>
</div> </div>
<div class="menu">
<slot></slot>
</div>
</div> </div>
`; `;
@ -139,9 +139,9 @@ export class FlyingButton extends HTMLElement {
break; break;
case 'disabled': case 'disabled':
if (newValue) { if (newValue) {
this.$div.classList.add('disabled'); this.$overall.classList.add('disabled');
} else { } else {
this.$div.classList.remove('disabled'); this.$overall.classList.remove('disabled');
} }
break; break;
default: default:

View File

@ -794,7 +794,7 @@ export const setLinkURLMethod = function (val) {
if (elem.tagName !== 'a') { if (elem.tagName !== 'a') {
// See if parent is an anchor // See if parent is an anchor
const parentsA = getParents(elem.parentNode, 'a'); const parentsA = getParents(elem.parentNode, 'a');
if (parentsA.length) { if (parentsA?.length) {
elem = parentsA[0]; elem = parentsA[0];
} else { } else {
return; return;

View File

@ -875,7 +875,7 @@ export const ungroupSelectedElement = function () {
return; return;
} }
const parentsA = getParents(g.parentNode, 'a'); const parentsA = getParents(g.parentNode, 'a');
if (parentsA.length) { if (parentsA?.length) {
g = parentsA[0]; g = parentsA[0];
} }