Browse Source

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 11 tháng trước cách đây
mục cha
commit
81779fa073
1 tập tin đã thay đổi với 1 bổ sung6 xóa
  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 {