File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -2587,3 +2587,21 @@ function setupActionSnooze(callback) {
25872587 } ) ;
25882588 $ ( document ) . on ( 'change' , '.nexter_input_snooze' , callback ) ;
25892589}
2590+
2591+ document . addEventListener ( "show.bs.dropdown" , function ( event ) {
2592+ const currentToggle = event . target ;
2593+
2594+ // If it's nested inside a dropdown menu, skip
2595+ if ( currentToggle . closest ( ".dropdown-menu" ) ) {
2596+ return ;
2597+ }
2598+
2599+ // Close other top-level dropdowns
2600+ document . querySelectorAll ( ".dropdown-toggle.show" ) . forEach ( ( openBtn ) => {
2601+ if ( openBtn !== currentToggle && ! openBtn . closest ( ".dropdown-menu" ) ) {
2602+ const dropdownInstance = bootstrap . Dropdown . getInstance ( openBtn ) ;
2603+ if ( dropdownInstance ) dropdownInstance . hide ( ) ;
2604+ }
2605+ } ) ;
2606+ } ) ;
2607+
You can’t perform that action at this time.
0 commit comments