Refixed tabIndex on the connector window with a better method
This commit is contained in:
@@ -409,12 +409,7 @@ export default {
|
|||||||
|
|
||||||
this.current.fields.push(f);
|
this.current.fields.push(f);
|
||||||
|
|
||||||
const newTabIndex = f.nextTabIndex();
|
tabIndex = f.nextTabIndex();
|
||||||
|
|
||||||
// Ignore if the field does not contain tabIndex
|
|
||||||
if (newTabIndex > 1) {
|
|
||||||
tabIndex = newTabIndex;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.submitterTabIndex = tabIndex > 0 ? tabIndex : 1;
|
this.submitterTabIndex = tabIndex > 0 ? tabIndex : 1;
|
||||||
|
|||||||
@@ -49,17 +49,26 @@ export function build(tabIndex, i, field) {
|
|||||||
blockedSuggestionValue: "",
|
blockedSuggestionValue: "",
|
||||||
blockingSuggestion: false,
|
blockingSuggestion: false,
|
||||||
nextTabIndex() {
|
nextTabIndex() {
|
||||||
if (this.field.readonly) {
|
let nextTabIndex = 0;
|
||||||
return this.tabIndex;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (this.field.readonly) {
|
||||||
|
nextTabIndex = this.tabIndex;
|
||||||
|
} else {
|
||||||
switch (this.field.type) {
|
switch (this.field.type) {
|
||||||
case "radio":
|
case "radio":
|
||||||
return this.tabIndex + this.field.example.split(",").length;
|
nextTabIndex = this.tabIndex + this.field.example.split(",").length;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return this.tabIndex + 1;
|
nextTabIndex = this.tabIndex + 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tabIndex >= nextTabIndex) {
|
||||||
|
return tabIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
return nextTabIndex;
|
||||||
},
|
},
|
||||||
nextSubTabIndex(subIndex) {
|
nextSubTabIndex(subIndex) {
|
||||||
if (this.field.readonly) {
|
if (this.field.readonly) {
|
||||||
|
|||||||
Reference in New Issue
Block a user