Fix opening panel after send document

This commit is contained in:
morethanwords 2020-09-02 00:16:04 +03:00
parent 024835dd8c
commit e179a12321
4 changed files with 28 additions and 9 deletions

View File

@ -61,6 +61,8 @@ export class EmoticonsDropdown {
if(firstTime) {
this.toggleEl.onmouseout = this.element.onmouseout = (e) => {
if(test) return;
if(!this.element.classList.contains('active')) return;
const toElement = (e as any).toElement as Element;
if(toElement && findUpClassName(toElement, 'emoji-dropdown')) {
return;
@ -68,7 +70,7 @@ export class EmoticonsDropdown {
clearTimeout(this.displayTimeout);
this.displayTimeout = setTimeout(() => {
this.toggle();
this.toggle(false);
}, 200);
};

View File

@ -1105,12 +1105,14 @@ export class AppMediaViewer {
this.updateMediaSource(target, url, 'img');
this.updateMediaSource(mover, url, 'img');
/* const imgs = mover.querySelectorAll('img');
if(imgs && imgs.length) {
imgs.forEach(img => {
img.classList.remove('thumbnail'); // может здесь это вообще не нужно
});
} */
if(mediaSizes.isMobile) {
const imgs = mover.querySelectorAll('img');
if(imgs && imgs.length) {
imgs.forEach(img => {
img.classList.remove('thumbnail'); // может здесь это вообще не нужно
});
}
}
} else {
const div = mover.firstElementChild && mover.firstElementChild.classList.contains('media-viewer-aspecter') ? mover.firstElementChild : mover;
let image = div.firstElementChild as HTMLImageElement;
@ -1121,7 +1123,10 @@ export class AppMediaViewer {
//this.log('will renderImageFromUrl:', image, div, target);
renderImageFromUrl(image, url, () => {
image.classList.remove('thumbnail'); // может здесь это вообще не нужно
if(mediaSizes.isMobile) {
image.classList.remove('thumbnail'); // может здесь это вообще не нужно
}
div.append(image);
});
}

View File

@ -238,6 +238,13 @@ $move-duration: .35s;
//}
}
// !SAFARI
svg {
img, video {
position: unset;
}
}
&.active {
transition: $open-duration transform;
}

View File

@ -57,6 +57,7 @@
.profile {
&-content {
/* flex: 1 1 auto; */
flex: 0 0 auto;
display: flex;
flex-direction: column;
/* height: 100%; */
@ -199,7 +200,7 @@
height: 120px;
margin: 1px auto 10px;
font-size: 2.5rem !important;
flex: 0 0 auto;
//flex: 0 0 auto;
@include respond-to(handhelds) {
margin: 0 auto 10px;
@ -212,6 +213,10 @@
}
}
&-name, &-subtitle, &-row, &-avatar {
flex: 0 0 auto;
}
&-tabs {
//margin-top: 36px;
position: -webkit-sticky !important;