diff --git a/src/public/javascripts/services/note_detail.js b/src/public/javascripts/services/note_detail.js index 862f0cf9d..3d4852bfb 100644 --- a/src/public/javascripts/services/note_detail.js +++ b/src/public/javascripts/services/note_detail.js @@ -228,15 +228,16 @@ async function loadAttributes() { const promoted = attributes.filter(attr => (attr.type === 'label-definition' || attr.type === 'relation-definition') && attr.value.isPromoted); - let idx = 1; + let idx = 2; // because idx is also tabIndex and 1 is the title async function createRow(definitionAttr, valueAttr) { const definition = definitionAttr.value; - const inputId = "promoted-input-" + (idx++); + const inputId = "promoted-input-" + idx; const $tr = $(""); const $labelCell = $("").append(valueAttr.name); const $input = $("") .prop("id", inputId) + .prop("tabindex", idx) .prop("attribute-id", valueAttr.isOwned ? valueAttr.attributeId : '') // if not owned, we'll force creation of a new attribute instead of updating the inherited one .prop("attribute-type", valueAttr.type) .prop("attribute-name", valueAttr.name) @@ -244,6 +245,8 @@ async function loadAttributes() { .addClass("form-control") .addClass("promoted-attribute-input"); + idx++; + const $inputCell = $("").append($("
").addClass("input-group").append($input)); const $actionCell = $(""); diff --git a/src/public/javascripts/services/note_detail_code.js b/src/public/javascripts/services/note_detail_code.js index 8748e4539..3cd9fc099 100644 --- a/src/public/javascripts/services/note_detail_code.js +++ b/src/public/javascripts/services/note_detail_code.js @@ -32,7 +32,7 @@ async function show() { lint: true, gutters: ["CodeMirror-lint-markers"], lineNumbers: true, - tabindex: 2 // so that tab from title will lead to code editor focus + tabindex: 100 }); codeEditor.on('change', noteDetailService.noteChanged); diff --git a/src/views/index.ejs b/src/views/index.ejs index 87adfe7d9..d39a25f97 100644 --- a/src/views/index.ejs +++ b/src/views/index.ejs @@ -184,7 +184,7 @@
-
+