mirror of
https://github.com/zadam/trilium.git
synced 2025-01-15 03:27:44 +08:00
don't update attribute detail while composing CJK characters, fixes #3812
This commit is contained in:
parent
24866a3e25
commit
293573a0cd
1 changed files with 15 additions and 3 deletions
|
@ -285,7 +285,11 @@ export default class AttributeDetailWidget extends NoteContextAwareWidget {
|
||||||
this.$title = this.$widget.find('.attr-detail-title');
|
this.$title = this.$widget.find('.attr-detail-title');
|
||||||
|
|
||||||
this.$inputName = this.$widget.find('.attr-input-name');
|
this.$inputName = this.$widget.find('.attr-input-name');
|
||||||
this.$inputName.on('keyup', () => this.userEditedAttribute());
|
this.$inputName.on('input', ev => {
|
||||||
|
if (!ev.originalEvent?.isComposing) { // https://github.com/zadam/trilium/pull/3812
|
||||||
|
this.userEditedAttribute();
|
||||||
|
}
|
||||||
|
});
|
||||||
this.$inputName.on('change', () => this.userEditedAttribute());
|
this.$inputName.on('change', () => this.userEditedAttribute());
|
||||||
this.$inputName.on('autocomplete:closed', () => this.userEditedAttribute());
|
this.$inputName.on('autocomplete:closed', () => this.userEditedAttribute());
|
||||||
|
|
||||||
|
@ -299,7 +303,11 @@ export default class AttributeDetailWidget extends NoteContextAwareWidget {
|
||||||
|
|
||||||
this.$rowValue = this.$widget.find('.attr-row-value');
|
this.$rowValue = this.$widget.find('.attr-row-value');
|
||||||
this.$inputValue = this.$widget.find('.attr-input-value');
|
this.$inputValue = this.$widget.find('.attr-input-value');
|
||||||
this.$inputValue.on('keyup', () => this.userEditedAttribute());
|
this.$inputValue.on('input', ev => {
|
||||||
|
if (!ev.originalEvent?.isComposing) { // https://github.com/zadam/trilium/pull/3812
|
||||||
|
this.userEditedAttribute();
|
||||||
|
}
|
||||||
|
});
|
||||||
this.$inputValue.on('change', () => this.userEditedAttribute());
|
this.$inputValue.on('change', () => this.userEditedAttribute());
|
||||||
this.$inputValue.on('autocomplete:closed', () => this.userEditedAttribute());
|
this.$inputValue.on('autocomplete:closed', () => this.userEditedAttribute());
|
||||||
this.$inputValue.on('focus', () => {
|
this.$inputValue.on('focus', () => {
|
||||||
|
@ -328,7 +336,11 @@ export default class AttributeDetailWidget extends NoteContextAwareWidget {
|
||||||
|
|
||||||
this.$rowInverseRelation = this.$widget.find('.attr-row-inverse-relation');
|
this.$rowInverseRelation = this.$widget.find('.attr-row-inverse-relation');
|
||||||
this.$inputInverseRelation = this.$widget.find('.attr-input-inverse-relation');
|
this.$inputInverseRelation = this.$widget.find('.attr-input-inverse-relation');
|
||||||
this.$inputInverseRelation.on('keyup', () => this.userEditedAttribute());
|
this.$inputInverseRelation.on('input', ev => {
|
||||||
|
if (!ev.originalEvent?.isComposing) { // https://github.com/zadam/trilium/pull/3812
|
||||||
|
this.userEditedAttribute();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
this.$rowTargetNote = this.$widget.find('.attr-row-target-note');
|
this.$rowTargetNote = this.$widget.find('.attr-row-target-note');
|
||||||
this.$inputTargetNote = this.$widget.find('.attr-input-target-note');
|
this.$inputTargetNote = this.$widget.find('.attr-input-target-note');
|
||||||
|
|
Loading…
Reference in a new issue