@@ -11,6 +11,7 @@ export default class OseCharacterCreator extends FormApplication {
1111 options . id = "character-creator" ;
1212 options . template = `${ OSE . systemPath ( ) } /templates/actors/dialogs/character-creation.html` ;
1313 options . width = 235 ;
14+ options . submitOnClose = false ;
1415 return options ;
1516 }
1617
@@ -123,31 +124,32 @@ export default class OseCharacterCreator extends FormApplication {
123124 } ) ;
124125 }
125126
126- async close ( options ) {
127- // Gather scores
128- const speaker = ChatMessage . getSpeaker ( { actor : this } ) ;
129- const templateData = {
130- config : CONFIG . OSE ,
131- scores : this . scores ,
132- title : game . i18n . localize ( "OSE.dialog.generator" ) ,
133- stats : this . object . stats ,
134- gold : this . gold ,
135- } ;
136- const content = await renderTemplate (
137- `${ OSE . systemPath ( ) } /templates/chat/roll-creation.html` ,
138- templateData
139- ) ;
140- ChatMessage . create ( {
141- content,
142- speaker,
143- } ) ;
144- return super . close ( options ) ;
145- }
127+ // // Removed for Issue #445
128+ // async close(options) {
129+ // // Gather scores
130+ // const speaker = ChatMessage.getSpeaker({ actor: this });
131+ // const templateData = {
132+ // config: CONFIG.OSE,
133+ // scores: this.scores,
134+ // title: game.i18n.localize("OSE.dialog.generator"),
135+ // stats: this.object.stats,
136+ // gold: this.gold,
137+ // };
138+ // const content = await renderTemplate(
139+ // `${OSE.systemPath()}/templates/chat/roll-creation.html`,
140+ // templateData
141+ // );
142+ // ChatMessage.create({
143+ // content,
144+ // speaker,
145+ // });
146+ // return super.close(options);
147+ // }
146148
147149 /** @override */
148150 activateListeners ( html ) {
149151 super . activateListeners ( html ) ;
150- html . find ( "a.score-roll" ) . click ( ( ev ) => {
152+ html . find ( "a.score-roll" ) . on ( "click" , ( ev ) => {
151153 const el = ev . currentTarget . parentElement . parentElement ;
152154 const { score } = el . dataset ;
153155 this . rollScore ( score , { event : ev } ) . then ( ( r ) => {
@@ -156,7 +158,7 @@ export default class OseCharacterCreator extends FormApplication {
156158 } ) ;
157159 } ) ;
158160
159- html . find ( "a.gold-roll" ) . click ( ( ev ) => {
161+ html . find ( "a.gold-roll" ) . on ( "click" , ( ev ) => {
160162 const el = ev . currentTarget . parentElement . parentElement . parentElement ;
161163 this . rollScore ( "gold" , { event : ev } ) . then ( ( r ) => {
162164 this . gold = 10 * r . total ;
0 commit comments