File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -90,8 +90,16 @@ abstract class ButtonInjectorBase implements ButtonInjector {
90
90
const btn = this . renderButton ( currentUrl , openAsPopup ) ;
91
91
92
92
const btnGroup = actionbar . getElementsByClassName ( "BtnGroup" ) ;
93
- if ( btnGroup && btnGroup . length > 0 && btnGroup [ 0 ] . classList . contains ( 'float-right' ) ) {
93
+ const detailsBtn = Array . from ( actionbar . children )
94
+ . filter ( child => child . tagName . toLowerCase ( ) === "details" && child . id . endsWith ( "more-options-details" ) ) ;
95
+ if ( btnGroup && btnGroup . length > 0 && btnGroup [ 0 ] . classList . contains ( 'float-right' ) ) {
94
96
actionbar . insertBefore ( btn , btnGroup [ 0 ] ) ;
97
+ } else if ( detailsBtn && detailsBtn . length > 0 ) {
98
+ if ( detailsBtn [ 0 ] . previousElementSibling ) {
99
+ detailsBtn [ 0 ] . previousElementSibling . classList . remove ( "mr-2" ) ;
100
+ }
101
+ btn . classList . add ( "mr-2" ) ;
102
+ actionbar . insertBefore ( btn , detailsBtn [ 0 ] ) ;
95
103
} else if ( this . asFirstChild && actionbar ) {
96
104
actionbar . insertBefore ( btn , actionbar . firstChild ) ;
97
105
} else {
You can’t perform that action at this time.
0 commit comments