Fix error switching creator field mode if a creator is open
This commit is contained in:
parent
9d564f022d
commit
c44b864923
1 changed files with 8 additions and 2 deletions
|
@ -968,6 +968,13 @@
|
|||
if (this._getFieldValue(lastName) == this._defaultLastName) {
|
||||
this._setFieldValue(lastName, this._defaultFullName);
|
||||
}
|
||||
|
||||
// If one of the creator fields is open, leave it open after swap
|
||||
let activeField = this._dynamicFields.querySelector('textbox');
|
||||
if (activeField == firstName || activeField == lastName) {
|
||||
this._lastTabIndex = parseInt(lastName.getAttribute('ztabindex'));
|
||||
this._tabDirection = false;
|
||||
}
|
||||
}
|
||||
// Switch to two-field mode
|
||||
else {
|
||||
|
@ -1052,8 +1059,7 @@
|
|||
fields.fieldMode = fieldMode;
|
||||
this.modifyCreator(index, fields);
|
||||
if (this.saveOnEdit) {
|
||||
// See note in transformText()
|
||||
this.blurOpenField().then(() => this.item.saveTx());
|
||||
this.item.saveTx();
|
||||
}
|
||||
}
|
||||
]]>
|
||||
|
|
Loading…
Add table
Reference in a new issue