mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 13:09:33 -06:00
FEATURE: Use appEvents instead of jQuery for composer resizing progress (#12574)
Additionally, add a composer:resize-started event to complement composer:resize-ended.
This commit is contained in:
parent
3db08c073b
commit
5d2cd15548
@ -112,6 +112,7 @@ export default Component.extend(KeyEnterEscape, {
|
||||
|
||||
const performDrag = (event) => {
|
||||
$composer.trigger("div-resizing");
|
||||
this.appEvents.trigger("composer:div-resizing");
|
||||
$composer.addClass("clear-transitions");
|
||||
const currentMousePos = mouseYPos(event);
|
||||
let size = origComposerSize + (lastMousePos - currentMousePos);
|
||||
@ -142,6 +143,7 @@ export default Component.extend(KeyEnterEscape, {
|
||||
lastMousePos = mouseYPos(event);
|
||||
$document.on(DRAG_EVENTS, throttledPerformDrag);
|
||||
$document.on(END_EVENTS, endDrag);
|
||||
this.appEvents.trigger("composer:resize-started");
|
||||
});
|
||||
|
||||
if (iOSWithVisualViewport()) {
|
||||
|
Loading…
Reference in New Issue
Block a user