浏览代码

Fix message dropdown menu placement:

The renderActions method on messages was trying to guess if the message
was the last one, to change the placement of the dropdown menu.
It seems that this is no more needed (maybe thanks to the bootstrap v5
upgrade).
This commit removes this code, to always use "dropstart" class.
John Livingston 1 年之前
父节点
当前提交
4f9eee5a5e
共有 1 个文件被更改,包括 1 次插入6 次删除
  1. 1 6
      src/shared/chat/message-actions.js

+ 1 - 6
src/shared/chat/message-actions.js

@@ -72,13 +72,8 @@ class MessageActions extends CustomElement {
         const buttons = await this.getActionButtons();
         const items = buttons.map(b => MessageActions.getActionsDropdownItem(b));
         if (items.length) {
-            // We want to let the message actions menu drop upwards if we're at the
-            // bottom of the message history, and down otherwise. This is to avoid
-            // the menu disappearing behind the bottom panel (toolbar, textarea etc).
-            // That's difficult to know from state, so we're making an approximation here.
-            const should_drop_up = this.model.collection.length > 3 && this.model === this.model.collection.last();
             return html`<converse-dropdown
-                class="chat-msg__actions btn-group ${should_drop_up ? 'dropup dropup--left' : 'dropstart'}"
+                class="chat-msg__actions btn-group dropstart"
                 .items=${items}
             ></converse-dropdown>`;
         } else {