From 7df88e338a79e9b35cbad1687e3a0f1c8750bc21 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Mon, 23 Jan 2023 22:04:14 +0100 Subject: [PATCH] FIX: adds negative skidding to popper offset (#19958) Learn more about skidding here: https://popper.js.org/docs/v2/modifiers/offset/#skidding-1 This change has two goals: - Fixes an issue when the user had zoomed the viewport and the popper would position on the opposite side - Makes msg actions arguably more pleasant to the eye by preventing it to be right aligned with the message container --- .../discourse/components/chat-message-actions-desktop.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-message-actions-desktop.js b/plugins/chat/assets/javascripts/discourse/components/chat-message-actions-desktop.js index 6ceb7ae07d0..d88a31d8148 100644 --- a/plugins/chat/assets/javascripts/discourse/components/chat-message-actions-desktop.js +++ b/plugins/chat/assets/javascripts/discourse/components/chat-message-actions-desktop.js @@ -33,7 +33,7 @@ export default Component.extend({ { name: "eventListeners", options: { scroll: false } }, { name: "offset", - options: { offset: [0, MSG_ACTIONS_VERTICAL_PADDING] }, + options: { offset: [-2, MSG_ACTIONS_VERTICAL_PADDING] }, }, ], }