File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -342,10 +342,7 @@ define([
342342 // Toggle operation (minimize)
343343 $ ( this . wrapSelector ( '.vp-popup-toggle' ) ) . on ( 'click' , function ( evt ) {
344344 evt . stopPropagation ( ) ;
345- $ ( that . eventTarget ) . trigger ( {
346- type : 'close_option_page' ,
347- component : that
348- } ) ;
345+ that . hide ( ) ;
349346 } ) ;
350347 // Maximize operation
351348 $ ( this . wrapSelector ( '.vp-popup-maximize' ) ) . on ( 'click' , function ( evt ) {
@@ -1071,7 +1068,15 @@ define([
10711068 close ( ) {
10721069 vpLog . display ( VP_LOG_TYPE . DEVELOP , 'close popup' , this ) ;
10731070 this . saveState ( ) ;
1074- this . hide ( ) ;
1071+ if ( this . getTaskType ( ) === 'task' ) {
1072+ $ ( this . eventTarget ) . trigger ( {
1073+ type : 'remove_option_page' ,
1074+ component : this
1075+ } ) ;
1076+ } else {
1077+ // if it's block, just hide it
1078+ this . hide ( ) ;
1079+ }
10751080 }
10761081
10771082 save ( ) {
Original file line number Diff line number Diff line change @@ -39,10 +39,7 @@ define([
3939 if ( isOpen ) {
4040 // hide task if it's already opened
4141 // open task
42- $ ( '#vp_wrapper' ) . trigger ( {
43- type : 'close_option_page' ,
44- component : that . state . task
45- } ) ;
42+ that . state . task . hide ( ) ;
4643 } else {
4744 // open task
4845 $ ( '#vp_wrapper' ) . trigger ( {
You can’t perform that action at this time.
0 commit comments