File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
resources/scripts/components/elements Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -40,9 +40,7 @@ class DropdownMenu extends React.PureComponent<Props, State> {
4040 if ( this . state . visible && ! prevState . visible && menu ) {
4141 document . addEventListener ( 'click' , this . windowListener ) ;
4242 document . addEventListener ( 'contextmenu' , this . contextMenuListener ) ;
43- menu . setAttribute (
44- 'style' , `left: ${ Math . round ( this . state . posX - menu . clientWidth ) } px` ,
45- ) ;
43+ menu . style . left = `${ Math . round ( this . state . posX - menu . clientWidth ) } px` ;
4644 }
4745
4846 if ( ! this . state . visible && prevState . visible ) {
@@ -94,6 +92,7 @@ class DropdownMenu extends React.PureComponent<Props, State> {
9492 e . stopPropagation ( ) ;
9593 this . setState ( { visible : false } ) ;
9694 } }
95+ style = { { width : '12rem' } }
9796 css = { tw `absolute bg-white p-2 rounded border border-neutral-700 shadow-lg text-neutral-500 z-50` }
9897 >
9998 { this . props . children }
You can’t perform that action at this time.
0 commit comments