Skip to content

Commit 34d8a45

Browse files
author
minjk-bl
committed
codeview event bug fix
1 parent 8a64435 commit 34d8a45

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

src/common/vpFrameEditor.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1674,6 +1674,7 @@ define([
16741674
$(that.wrapSelector('.' + VP_FE_DETAIL_BOX)).hide();
16751675
}
16761676
if (!$(evt.target).hasClass(VP_FE_BUTTON_PREVIEW)
1677+
&& !$(evt.target).hasClass(VP_FE_PREVIEW_BOX)
16771678
&& $(that.wrapSelector('.' + VP_FE_PREVIEW_BOX)).has(evt.target).length === 0) {
16781679
that.closePreview();
16791680
}

src/common/vpMerge.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ define([
126126
...state
127127
};
128128
}
129-
129+
130130
this.bindEvent();
131131
this.render();
132132
vpCommon.loadCssForDiv(this._wrapSelector(), Jupyter.notebook.base_url + vpConst.BASE_PATH + vpConst.STYLE_PATH + 'common/popupPage.css');
@@ -246,10 +246,11 @@ define([
246246

247247
// click other
248248
$(document).on('click.' + this.uuid, function(evt) {
249-
if (!$(evt.target).hasClass('.' + APP_BUTTON_DETAIL)) {
249+
if (!$(evt.target).hasClass(APP_BUTTON_DETAIL)) {
250250
$(that._wrapSelector('.' + APP_DETAIL_BOX)).hide();
251251
}
252-
if (!$(evt.target).hasClass('.' + APP_BUTTON_PREVIEW)
252+
if (!$(evt.target).hasClass(APP_BUTTON_PREVIEW)
253+
&& !$(evt.target).hasClass(APP_PREVIEW_BOX)
253254
&& $(that._wrapSelector('.' + APP_PREVIEW_BOX)).has(evt.target).length === 0) {
254255
that.closePreview();
255256
}

src/common/vpPopupPage.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,11 @@ define([
252252

253253
// click other
254254
$(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)) {
256256
$(that.wrapSelector('.' + VP_PP_DETAIL_BOX)).hide();
257257
}
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)
259260
&& $(that.wrapSelector('.' + VP_PP_PREVIEW_BOX)).has(evt.target).length === 0) {
260261
that.closePreview();
261262
}

src/common/vpReshape.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,8 @@ define([
239239
if (!$(evt.target).hasClass('.' + APP_BUTTON_DETAIL)) {
240240
$(that._wrapSelector('.' + APP_DETAIL_BOX)).hide();
241241
}
242-
if (!$(evt.target).hasClass('.' + APP_BUTTON_PREVIEW)
242+
if (!$(evt.target).hasClass(APP_BUTTON_PREVIEW)
243+
&& !$(evt.target).hasClass(APP_PREVIEW_BOX)
243244
&& $(that._wrapSelector('.' + APP_PREVIEW_BOX)).has(evt.target).length === 0) {
244245
that.closePreview();
245246
}

0 commit comments

Comments
 (0)