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) {
|
if (this._getFieldValue(lastName) == this._defaultLastName) {
|
||||||
this._setFieldValue(lastName, this._defaultFullName);
|
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
|
// Switch to two-field mode
|
||||||
else {
|
else {
|
||||||
|
@ -1052,8 +1059,7 @@
|
||||||
fields.fieldMode = fieldMode;
|
fields.fieldMode = fieldMode;
|
||||||
this.modifyCreator(index, fields);
|
this.modifyCreator(index, fields);
|
||||||
if (this.saveOnEdit) {
|
if (this.saveOnEdit) {
|
||||||
// See note in transformText()
|
this.item.saveTx();
|
||||||
this.blurOpenField().then(() => this.item.saveTx());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]]>
|
]]>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue