@@ -107,12 +107,13 @@ define([
107107that . state . originObj = origin ;
108108that . state . tempObj = '_vp' ;
109109that . state . returnObj = that . state . tempObj ;
110- that . state . inplace = false ;
110+ if ( that . state . inplace === true ) {
111+ that . state . returnObj = origin ;
112+ }
111113that . initState ( ) ;
112114
113115// reset return obj
114- $ ( that . wrapSelector ( '#vp_feReturn' ) ) . val ( that . state . tempObj ) ;
115- $ ( that . wrapSelector ( '#inplace' ) ) . prop ( 'checked' , false ) ;
116+ $ ( that . wrapSelector ( '#vp_feReturn' ) ) . val ( that . state . returnObj ) ;
116117
117118// reset table
118119$ ( that . wrapSelector ( '.' + VP_FE_TABLE ) ) . replaceWith ( function ( ) {
@@ -514,14 +515,15 @@ define([
514515super . render ( ) ;
515516
516517var {
518+ originObj,
517519 returnObj,
518520 inplace,
519521 steps
520522} = this . state ;
521523
522524this . loadVariableList ( ) ;
523525
524- $ ( this . wrapSelector ( '#vp_feVariable' ) ) . val ( this . state . originObj ) ;
526+ $ ( this . wrapSelector ( '#vp_feVariable' ) ) . val ( originObj ) ;
525527
526528$ ( this . wrapSelector ( '#vp_feReturn' ) ) . val ( returnObj ) ;
527529
@@ -1485,7 +1487,11 @@ define([
14851487that . loadInfo ( ) ;
14861488// add to stack
14871489if ( codeStr !== '' ) {
1488- that . state . steps . push ( codeStr ) ;
1490+ let newSteps = codeStr . split ( '\n' ) ;
1491+ that . state . steps = [
1492+ ...that . state . steps ,
1493+ ...newSteps
1494+ ]
14891495var replacedCode = codeStr . replaceAll ( that . state . tempObj , that . state . returnObj ) ;
14901496that . setPreview ( replacedCode ) ;
14911497}
@@ -1509,7 +1515,10 @@ define([
15091515} ) . catch ( function ( resultObj ) {
15101516let { result, type, msg} = resultObj ;
15111517vpLog . display ( VP_LOG_TYPE . ERROR , result . ename + ': ' + result . evalue , msg , code . toString ( ) ) ;
1512- com_util . renderAlertModal ( result . ename + ': ' + result . evalue ) ;
1518+ if ( that . isHidden ( ) == false ) {
1519+ // show alert modal only if this popup is visible
1520+ com_util . renderAlertModal ( result . ename + ': ' + result . evalue ) ;
1521+ }
15131522that . loading = false ;
15141523} ) ;
15151524