1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Remove TypedInput from tab focus when only one type available

This commit is contained in:
Nick O'Leary 2021-04-19 15:27:47 +01:00
parent ff00afb5d7
commit 233a74c146
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -669,6 +669,11 @@
that.typeMap[result.value] = result;
return result;
});
if (this.typeList.length < 2) {
this.selectTrigger.attr("tabindex", -1)
} else {
this.selectTrigger.attr("tabindex", 0)
}
this.selectTrigger.toggleClass("disabled", this.typeList.length === 1);
this.selectTrigger.find(".fa-caret-down").toggle(this.typeList.length > 1)
if (this.menu) {