Browse Source

Fix breaking layout in desktop PWA mode

Fix chat border-left
master
Eduard Kuzmenko 4 years ago
parent
commit
4822a2867e
  1. 2
      src/components/chat/input.ts
  2. 2
      src/components/chat/selection.ts
  3. 6
      src/lib/appManagers/appImManager.ts
  4. 3
      src/scss/partials/_chat.scss

2
src/components/chat/input.ts

@ -101,7 +101,7 @@ export default class ChatInput { @@ -101,7 +101,7 @@ export default class ChatInput {
public sendSilent: true;
private recorder: any;
private recording = false;
public recording = false;
private recordCanceled = false;
private recordTimeEl: HTMLElement;
private recordRippleEl: HTMLElement;

2
src/components/chat/selection.ts

@ -289,7 +289,7 @@ export default class ChatSelection { @@ -289,7 +289,7 @@ export default class ChatSelection {
}
} */
blurActiveElement(); // * for mobile keyboards
blurActiveElement();
let transform = '', borderRadius = '';
const forwards = !!this.selectedMids.size || forceSelection;

6
src/lib/appManagers/appImManager.ts

@ -486,7 +486,10 @@ export class AppImManager { @@ -486,7 +486,10 @@ export class AppImManager {
e.target !== chat.input.messageInput &&
target.tagName !== 'INPUT' &&
!target.hasAttribute('contenteditable') &&
!isTouchSupported) {
!isTouchSupported &&
(!mediaSizes.isMobile || this.tabId === 1) &&
!this.chat.selection.isSelecting &&
!this.chat.input.recording) {
chat.input.messageInput.focus();
placeCaretAtEnd(chat.input.messageInput);
}
@ -689,6 +692,7 @@ export class AppImManager { @@ -689,6 +692,7 @@ export class AppImManager {
}
this.tabId = id;
blurActiveElement();
if(mediaSizes.isMobile && prevTabId === 2 && id < 2) {
document.body.classList.remove(RIGHT_COLUMN_ACTIVE_CLASSNAME);
}

3
src/scss/partials/_chat.scss

@ -484,7 +484,8 @@ $chat-helper-size: 39px; @@ -484,7 +484,8 @@ $chat-helper-size: 39px;
}
body.is-left-column-shown & {
transform: translate3d(26.5rem, 0, 0);
//transform: translate3d(26.5rem, 0, 0);
transform: translate3d(26.5625rem, 0, 0); // + 1px to show left border
.sidebar-close-button {
transform: rotate(180deg);

Loading…
Cancel
Save