Browse Source

Fix opening panel after send document

master
morethanwords 4 years ago
parent
commit
369536b9b7
  1. 4
      src/components/emoticonsDropdown/index.ts
  2. 9
      src/lib/appManagers/appMediaViewer.ts
  3. 7
      src/scss/partials/_mediaViewer.scss
  4. 7
      src/scss/partials/_rightSidebar.scss

4
src/components/emoticonsDropdown/index.ts

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

9
src/lib/appManagers/appMediaViewer.ts

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

7
src/scss/partials/_mediaViewer.scss

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

7
src/scss/partials/_rightSidebar.scss

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

Loading…
Cancel
Save