File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 1515 }
1616 }
1717
18- ~ .#{$prefix } btn-icon {
19- margin-left : $padding-xs ;
20- }
18+ // ~ .#{$prefix}btn-icon {
19+ // margin-left: $padding-xs;
20+ // }
2121}
2222
2323.#{$prefix } popover-dropdown-menu {
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ function getPopoverLeftPosition(
6060 break ;
6161 case 'top' :
6262 case 'bottom' :
63- offsetLeft = activatorRect . left + activatorRect . width / 2 - width / 2 ;
63+ offsetLeft = activatorRect . left + ( activatorRect . width / 2 ) - ( width / 2 ) ;
6464 break ;
6565 case 'bottom-left' :
6666 case 'top-left' :
@@ -71,6 +71,12 @@ function getPopoverLeftPosition(
7171 offsetLeft = activatorRect . left + activatorRect . width - width ;
7272 break ;
7373 }
74+
75+ if ( [ 'top' , 'top-left' , 'bottom' , 'bottom-left' ] . includes ( placement as string ) ) {
76+ if ( ( offsetLeft + width ) >= ( maxLeft + width ) ) {
77+ offsetLeft = maxLeft ;
78+ }
79+ }
7480
7581 return Math . max ( minLeft , offsetLeft ) ;
7682}
You can’t perform that action at this time.
0 commit comments