Browse Source

Fixes dropdown target without a `buttonRef` (edit history) (#28427)

Renaud Chaput 5 months ago
parent
commit
7b1d390734
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/javascript/mastodon/components/dropdown_menu.jsx

+ 1 - 1
app/javascript/mastodon/components/dropdown_menu.jsx

@@ -257,7 +257,7 @@ class Dropdown extends PureComponent {
   };
 
   findTarget = () => {
-    return this.target?.buttonRef?.current;
+    return this.target?.buttonRef?.current ?? this.target;
   };
 
   componentWillUnmount = () => {