From c5540516da8d56b55dfaf17d0554cdbbdec5fa6c Mon Sep 17 00:00:00 2001 From: megastruktur Date: Wed, 20 May 2020 14:53:48 +0300 Subject: [PATCH] GH-48 Character Notes save fix - Closes #48 - Fixes Character Notes save when adding a new EmbedItem --- CHANGELOG.txt | 3 +++ module/blades-sheet.js | 5 +++++ system.json | 6 +++--- 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 CHANGELOG.txt diff --git a/CHANGELOG.txt b/CHANGELOG.txt new file mode 100644 index 0000000..5bd8136 --- /dev/null +++ b/CHANGELOG.txt @@ -0,0 +1,3 @@ +v0.5.2 + +- Textareas are now saved when adding embedded entity. \ No newline at end of file diff --git a/module/blades-sheet.js b/module/blades-sheet.js index 19f31c1..53b6892 100644 --- a/module/blades-sheet.js +++ b/module/blades-sheet.js @@ -11,6 +11,11 @@ export class BladesSheet extends ActorSheet { activateListeners(html) { super.activateListeners(html); html.find(".item-add-popup").click(this._onItemAddClick.bind(this)); + + // This is a workaround until is being fixed in FoundryVTT. + if ( this.options.submitOnChange ) { + html.on("change", "textarea", this._onChangeInput.bind(this)); // Use delegated listener on the form + } } /* -------------------------------------------- */ diff --git a/system.json b/system.json index 590e9da..f8537b8 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "name": "blades-in-the-dark", "title": "Blades in the Dark", "description": "Blades in the dark game system.", - "version": "0.5.1", + "version": "0.5.2", "minimumCoreVersion": "0.5.3", "compatibleCoreVersion": "0.5.7", "templateVersion": 1, @@ -11,8 +11,8 @@ "styles": ["styles/blades.css"], "languages": ["en"], "url": "https://github.com/megastruktur/foundryvtt-blades-in-the-dark/", - "manifest": "https://raw.githubusercontent.com/megastruktur/foundryvtt-blades-in-the-dark/master/system.json", - "download": "https://github.com/megastruktur/foundryvtt-blades-in-the-dark/archive/0.5.1.zip", + "manifest": "https://raw.githubusercontent.com/megastruktur/foundryvtt-blades-in-the-dark/0.5.2/system.json", + "download": "https://github.com/megastruktur/foundryvtt-blades-in-the-dark/archive/0.5.2.zip", "packs": [ { "name": "class",