Browse Source

more fixes

master
Eduard Kuzmenko 2 years ago
parent
commit
f824219dae
  1. 2
      src/components/dialogsContextMenu.ts
  2. 5
      src/components/stickerViewer.ts

2
src/components/dialogsContextMenu.ts

@ -121,7 +121,7 @@ export default class DialogsContextMenu { @@ -121,7 +121,7 @@ export default class DialogsContextMenu {
}, {
langKey: 'FiltersSetupPinAlert',
callback: () => {
appSidebarLeft.createTab(AppChatFoldersTab);
appSidebarLeft.createTab(AppChatFoldersTab).open();
}
}],
descriptionLangKey: 'PinToTopLimitReached2',

5
src/components/stickerViewer.ts

@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
import IS_TOUCH_SUPPORTED from '../environment/touchSupport';
import cancelEvent from '../helpers/dom/cancelEvent';
import {simulateClickEvent, attachClickEvent} from '../helpers/dom/clickEvent';
import findUpAsChild from '../helpers/dom/findUpAsChild';
import findUpClassName from '../helpers/dom/findUpClassName';
import getVisibleRect from '../helpers/dom/getVisibleRect';
import ListenerSetter from '../helpers/listenerSetter';
@ -273,7 +274,8 @@ export default function attachStickerViewerListeners({listenTo, listenerSetter}: @@ -273,7 +274,8 @@ export default function attachStickerViewerListeners({listenTo, listenerSetter}:
};
const onMousePreMove = (e: MouseEvent) => {
if(!findUpClassName(e.target, findClassName)) {
if(!findUpAsChild(e.target as HTMLElement, mediaContainer)) {
document.removeEventListener('mousemove', onMousePreMove);
onMouseUp();
}
};
@ -293,7 +295,6 @@ export default function attachStickerViewerListeners({listenTo, listenerSetter}: @@ -293,7 +295,6 @@ export default function attachStickerViewerListeners({listenTo, listenerSetter}:
attachClickEvent(document.body, cancelEvent, {capture: true, once: true});
}
document.removeEventListener('mousemove', onMousePreMove);
document.removeEventListener('mousemove', onMouseMove);
};

Loading…
Cancel
Save