File tree 4 files changed +10
-6
lines changed 4 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -1674,6 +1674,7 @@ define([
1674
1674
$ ( that . wrapSelector ( '.' + VP_FE_DETAIL_BOX ) ) . hide ( ) ;
1675
1675
}
1676
1676
if ( ! $ ( evt . target ) . hasClass ( VP_FE_BUTTON_PREVIEW )
1677
+ && ! $ ( evt . target ) . hasClass ( VP_FE_PREVIEW_BOX )
1677
1678
&& $ ( that . wrapSelector ( '.' + VP_FE_PREVIEW_BOX ) ) . has ( evt . target ) . length === 0 ) {
1678
1679
that . closePreview ( ) ;
1679
1680
}
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ define([
126
126
...state
127
127
} ;
128
128
}
129
-
129
+
130
130
this . bindEvent ( ) ;
131
131
this . render ( ) ;
132
132
vpCommon . loadCssForDiv ( this . _wrapSelector ( ) , Jupyter . notebook . base_url + vpConst . BASE_PATH + vpConst . STYLE_PATH + 'common/popupPage.css' ) ;
@@ -246,10 +246,11 @@ define([
246
246
247
247
// click other
248
248
$ ( document ) . on ( 'click.' + this . uuid , function ( evt ) {
249
- if ( ! $ ( evt . target ) . hasClass ( '.' + APP_BUTTON_DETAIL ) ) {
249
+ if ( ! $ ( evt . target ) . hasClass ( APP_BUTTON_DETAIL ) ) {
250
250
$ ( that . _wrapSelector ( '.' + APP_DETAIL_BOX ) ) . hide ( ) ;
251
251
}
252
- if ( ! $ ( evt . target ) . hasClass ( '.' + APP_BUTTON_PREVIEW )
252
+ if ( ! $ ( evt . target ) . hasClass ( APP_BUTTON_PREVIEW )
253
+ && ! $ ( evt . target ) . hasClass ( APP_PREVIEW_BOX )
253
254
&& $ ( that . _wrapSelector ( '.' + APP_PREVIEW_BOX ) ) . has ( evt . target ) . length === 0 ) {
254
255
that . closePreview ( ) ;
255
256
}
Original file line number Diff line number Diff line change @@ -252,10 +252,11 @@ define([
252
252
253
253
// click other
254
254
$ ( document ) . on ( 'click.' + this . uuid , function ( evt ) {
255
- if ( ! $ ( evt . target ) . hasClass ( '.' + VP_PP_BUTTON_DETAIL ) ) {
255
+ if ( ! $ ( evt . target ) . hasClass ( VP_PP_BUTTON_DETAIL ) ) {
256
256
$ ( that . wrapSelector ( '.' + VP_PP_DETAIL_BOX ) ) . hide ( ) ;
257
257
}
258
- if ( ! $ ( evt . target ) . hasClass ( '.' + VP_PP_BUTTON_PREVIEW )
258
+ if ( ! $ ( evt . target ) . hasClass ( VP_PP_BUTTON_PREVIEW )
259
+ && ! $ ( evt . target ) . hasClass ( VP_PP_PREVIEW_BOX )
259
260
&& $ ( that . wrapSelector ( '.' + VP_PP_PREVIEW_BOX ) ) . has ( evt . target ) . length === 0 ) {
260
261
that . closePreview ( ) ;
261
262
}
Original file line number Diff line number Diff line change @@ -239,7 +239,8 @@ define([
239
239
if ( ! $ ( evt . target ) . hasClass ( '.' + APP_BUTTON_DETAIL ) ) {
240
240
$ ( that . _wrapSelector ( '.' + APP_DETAIL_BOX ) ) . hide ( ) ;
241
241
}
242
- if ( ! $ ( evt . target ) . hasClass ( '.' + APP_BUTTON_PREVIEW )
242
+ if ( ! $ ( evt . target ) . hasClass ( APP_BUTTON_PREVIEW )
243
+ && ! $ ( evt . target ) . hasClass ( APP_PREVIEW_BOX )
243
244
&& $ ( that . _wrapSelector ( '.' + APP_PREVIEW_BOX ) ) . has ( evt . target ) . length === 0 ) {
244
245
that . closePreview ( ) ;
245
246
}
You can’t perform that action at this time.
0 commit comments