File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -178,20 +178,20 @@ define([
178178 }
179179
180180 PopupPage . prototype . openPreview = function ( ) {
181+ $ ( this . wrapSelector ( '.' + VP_PP_PREVIEW_BOX ) ) . show ( ) ;
182+
181183 if ( this . pageThis ) {
182184 var code = this . pageThis . generateCode ( false , false ) ;
183185 this . cmpreview . setValue ( code ) ;
184186 this . cmpreview . save ( ) ;
185- this . cmpreview . focus ( ) ;
186-
187+
187188 var that = this ;
188189 setTimeout ( function ( ) {
189190 that . cmpreview . refresh ( ) ;
190- } , 1 ) ;
191-
192- this . previewOpened = true ;
193- $ ( this . wrapSelector ( '.' + VP_PP_PREVIEW_BOX ) ) . show ( ) ;
191+ } , 1 ) ;
194192 }
193+
194+ this . previewOpened = true ;
195195 }
196196
197197 PopupPage . prototype . closePreview = function ( ) {
@@ -213,7 +213,7 @@ define([
213213
214214 // click preview
215215 $ ( document ) . on ( 'click' , this . wrapSelector ( '.' + VP_PP_BUTTON_PREVIEW ) , function ( evt ) {
216- // evt.stopPropagation();
216+ evt . stopPropagation ( ) ;
217217 if ( that . previewOpened ) {
218218 that . closePreview ( ) ;
219219 } else {
You can’t perform that action at this time.
0 commit comments