Fix the hint editor to make an undo entry
This commit is contained in:
parent
f2366be039
commit
f48cef5250
@ -103,8 +103,9 @@ class HintTileEditor extends TileEditorOverlay {
|
|||||||
this.root.append(mk('h3', "Hint text"));
|
this.root.append(mk('h3', "Hint text"));
|
||||||
this.text = mk('textarea.editor-hint-tile-text');
|
this.text = mk('textarea.editor-hint-tile-text');
|
||||||
this.root.append(this.text);
|
this.root.append(this.text);
|
||||||
this.text.addEventListener('input', ev => {
|
this.text.addEventListener('change', ev => {
|
||||||
if (this.tile) {
|
if (this.tile && this.text.value !== this.tile.hint_text) {
|
||||||
|
this.mark_dirty();
|
||||||
this.tile.hint_text = this.text.value;
|
this.tile.hint_text = this.text.value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user