Don't erase name field when tabbing from it

(closes #5760)
This commit is contained in:
Bryan Housel
2019-01-25 16:16:07 -05:00
parent 55715a4827
commit 5d6e331635
+6 -4
View File
@@ -223,10 +223,12 @@ export function uiFieldLocalized(field, context) {
// NOTE: split/join on en-dash, not a hypen (to avoid conflict with fr - nl names in Brussels etc)
var name = utilGetSetValue(input);
var parts = name.split(' ');
parts.pop();
name = parts.join(' ');
utilGetSetValue(input, name);
dispatch.call('change', this, { name: name });
if (parts.length > 1) {
parts.pop();
var name = parts.join(' ');
utilGetSetValue(input, name);
dispatch.call('change', this, { name: name });
}
}