@@ -1086,7 +1086,7 @@ var link = (function() {
10861086 group . querySelector ( ".group-body" ) . appendChild ( render . item . link ( ) ) ;
10871087 } ) ;
10881088 } else {
1089- group . querySelector ( ".group-body" ) . appendChild ( render . empty . item ( ) ) ;
1089+ group . querySelector ( ".group-body" ) . appendChild ( render . empty . item ( stagedGroup . position . destination ) ) ;
10901090 } ;
10911091 linkSection . appendChild ( group ) ;
10921092 stagedGroup . reset ( ) ;
@@ -1140,7 +1140,7 @@ var link = (function() {
11401140 } , false ) ;
11411141 return group ;
11421142 } ,
1143- item : function ( ) {
1143+ item : function ( groupIndex ) {
11441144 var linkEmpty = helper . node ( "div|class:link-empty link-item" ) ;
11451145 var paraWrap = helper . node ( "div|class:p-wrap" ) ;
11461146 var para = helper . node ( "p:Empty Group|class:pb-0" ) ;
@@ -1152,6 +1152,7 @@ var link = (function() {
11521152 linkEmpty . appendChild ( buttonWrap ) ;
11531153 addButton . addEventListener ( "click" , function ( event ) {
11541154 link . add . item . open ( ) ;
1155+ link . add . item . selectGroup ( groupIndex ) ;
11551156 } , false ) ;
11561157 return linkEmpty ;
11571158 } ,
@@ -1369,6 +1370,10 @@ var link = (function() {
13691370 stagedLink . reset ( ) ;
13701371 modal . close ( ) ;
13711372 pagelock . unlock ( ) ;
1373+ } ,
1374+ selectGroup : function ( groupIndex ) {
1375+ stagedLink . position . destination . group = groupIndex ;
1376+ helper . e ( ".link-form-select-group" ) . selectedIndex = stagedLink . position . destination . group ;
13721377 }
13731378 } ,
13741379 group : {
@@ -1611,6 +1616,9 @@ var link = (function() {
16111616 } ,
16121617 close : function ( ) {
16131618 render . add . item . close ( ) ;
1619+ } ,
1620+ selectGroup : function ( groupIndex ) {
1621+ render . add . item . selectGroup ( groupIndex ) ;
16141622 }
16151623 } ,
16161624 group : {
0 commit comments