소스 검색

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 달 전
부모
커밋
81779fa073
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 {