File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
web_src/js/modules/fomantic Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,12 @@ import {queryElemChildren} from '../../utils/dom.js';
33
44export function initFomanticDimmer ( ) {
55 // stand-in for removed dimmer module
6- $ . fn . dimmer = function ( arg0 , $el ) {
6+ $ . fn . dimmer = function ( arg0 , arg1 ) {
77 if ( arg0 === 'add content' ) {
8+ const $el = arg1 ;
89 const existingDimmer = document . querySelector ( 'body > .ui.dimmer' ) ;
910 if ( existingDimmer ) {
10- queryElemChildren ( existingDimmer , '*' , ( el ) => el . remove ( ) ) ;
11+ queryElemChildren ( existingDimmer , '*' , ( el ) => el . classList . add ( 'hidden' ) ) ;
1112 this . _dimmer = existingDimmer ;
1213 } else {
1314 this . _dimmer = document . createElement ( 'div' ) ;
@@ -21,8 +22,10 @@ export function initFomanticDimmer() {
2122 this . _dimmer . classList . add ( 'active' ) ;
2223 document . body . classList . add ( 'tw-overflow-hidden' ) ;
2324 } else if ( arg0 === 'hide' ) {
25+ const cb = arg1 ;
2426 this . _dimmer . classList . remove ( 'active' ) ;
2527 document . body . classList . remove ( 'tw-overflow-hidden' ) ;
28+ cb ( ) ;
2629 }
2730 return this ;
2831 } ;
You can’t perform that action at this time.
0 commit comments