From 4229e3f22caac7ded114340596af0dd8a4fbad2e Mon Sep 17 00:00:00 2001 From: David Taylor Date: Fri, 26 Nov 2021 16:17:00 +0000 Subject: [PATCH] DEV: Set `passive: false` on composer grippie events We do call `event.preventDefault()` on these events. They're limited to a single element, so performance impact should be negligable. Adding `passive: false` prevents the chrome dev tools warning. --- .../javascripts/discourse/app/components/composer-body.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/components/composer-body.js b/app/assets/javascripts/discourse/app/components/composer-body.js index fb8bf92456..4be24a8df8 100644 --- a/app/assets/javascripts/discourse/app/components/composer-body.js +++ b/app/assets/javascripts/discourse/app/components/composer-body.js @@ -112,7 +112,9 @@ export default Component.extend(KeyEnterEscape, { START_DRAG_EVENTS.forEach((startDragEvent) => { this.element .querySelector(".grippie") - ?.addEventListener(startDragEvent, this.startDragHandler); + ?.addEventListener(startDragEvent, this.startDragHandler, { + passive: false, + }); }); if (this._visualViewportResizing()) {