Add event handling for the custom input elements
This commit is contained in:
parent
7b3ea59185
commit
d1cb412e5a
1 changed files with 9 additions and 0 deletions
|
|
@ -43,6 +43,15 @@ export class GenericItemSheet extends ItemSheet {
|
|||
|
||||
if (!this.isEditable) return;
|
||||
console.debug(`.dungeon | Adding event listeners for Generic Item: ${this.id}`);
|
||||
|
||||
/*
|
||||
Custom element event listeners because Foundry doesn't listen to them by
|
||||
default.
|
||||
*/
|
||||
html.find(
|
||||
CONFIG.CACHE.componentListeners.map(n => `${n}[name]`).join(`,`)
|
||||
).on(`change`, () => this._onChangeInput.bind(this));
|
||||
|
||||
html.find(`button[data-increment]`)
|
||||
.on(`click`, this._incrementValue.bind(this));
|
||||
html.find(`button[data-decrement]`)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue