Skip to content

Commit f9694f8

Browse files
committed
Fix snippets bug
1 parent 3c640d2 commit f9694f8

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/api_block/blockContainer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1835,6 +1835,7 @@ define([
18351835
if (Object.keys(loaded).includes('initOption')) {
18361836
loaded.initOption(function(funcJS) {
18371837
that.appsMenu = new popupPage(funcJS, 'vp_appsCode');
1838+
funcJS.wrapSelector = that.appsMenu.wrapSelector;
18381839
// library page
18391840
$(vpCommon.wrapSelector(vpCommon.formatString("#{0}", vpConst.OPTION_GREEN_ROOM), vpCommon.formatString(".{0}", vpConst.API_OPTION_PAGE))).each(function() {
18401841
that.appsMenu.open({

src/file_io/udf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ define([
333333
var dupSnippet = { [dupTitle]: { code: code, timestamp: timestamp } };
334334
vpSetting.saveUserDefinedCode(dupSnippet);
335335

336-
var tag = $(that.wrapSelector('.vp-sn-item-code textarea[data-title="' + dupTitle + '"]'));
336+
var tag = $(that.wrapSelector('.vp-sn-item[data-title="' + dupTitle + '"] textarea'));
337337
that.bindCodeMirror(dupTitle, tag[0]);
338338
$(dupItem).find('.vp-sn-indicator').trigger('click');
339339

0 commit comments

Comments
 (0)