File tree 2 files changed +11
-9
lines changed
2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -342,10 +342,7 @@ define([
342
342
// Toggle operation (minimize)
343
343
$ ( this . wrapSelector ( '.vp-popup-toggle' ) ) . on ( 'click' , function ( evt ) {
344
344
evt . stopPropagation ( ) ;
345
- $ ( that . eventTarget ) . trigger ( {
346
- type : 'close_option_page' ,
347
- component : that
348
- } ) ;
345
+ that . hide ( ) ;
349
346
} ) ;
350
347
// Maximize operation
351
348
$ ( this . wrapSelector ( '.vp-popup-maximize' ) ) . on ( 'click' , function ( evt ) {
@@ -1071,7 +1068,15 @@ define([
1071
1068
close ( ) {
1072
1069
vpLog . display ( VP_LOG_TYPE . DEVELOP , 'close popup' , this ) ;
1073
1070
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
+ }
1075
1080
}
1076
1081
1077
1082
save ( ) {
Original file line number Diff line number Diff line change @@ -39,10 +39,7 @@ define([
39
39
if ( isOpen ) {
40
40
// hide task if it's already opened
41
41
// open task
42
- $ ( '#vp_wrapper' ) . trigger ( {
43
- type : 'close_option_page' ,
44
- component : that . state . task
45
- } ) ;
42
+ that . state . task . hide ( ) ;
46
43
} else {
47
44
// open task
48
45
$ ( '#vp_wrapper' ) . trigger ( {
You can’t perform that action at this time.
0 commit comments