From db0911cc28d6b71136eec014b77a014760c81c1f Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sun, 20 Oct 2024 01:11:29 +0300 Subject: [PATCH] client: Focus promoted cell when clicking label --- .../app/widgets/ribbon_widgets/promoted_attributes.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/public/app/widgets/ribbon_widgets/promoted_attributes.js b/src/public/app/widgets/ribbon_widgets/promoted_attributes.js index 6811ea1c6..15326e734 100644 --- a/src/public/app/widgets/ribbon_widgets/promoted_attributes.js +++ b/src/public/app/widgets/ribbon_widgets/promoted_attributes.js @@ -30,6 +30,10 @@ const TPL = ` margin: 10px; display: table-row; } + .promoted-attribute-cell > label { + user-select: none; + font-weight: bold; + } .promoted-attribute-cell > * { display: table-cell; padding: 1px 0; @@ -140,9 +144,11 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget { async createPromotedAttributeCell(definitionAttr, valueAttr, valueName) { const definition = definitionAttr.getDefinition(); + const id = `value-${this.noteId}-${definitionAttr.position}`; const $input = $("") .prop("tabindex", 200 + definitionAttr.position) + .prop("id", id) .attr("data-attribute-id", valueAttr.noteId === this.noteId ? valueAttr.attributeId : '') // if not owned, we'll force creation of a new attribute instead of updating the inherited one .attr("data-attribute-type", valueAttr.type) .attr("data-attribute-name", valueAttr.name) @@ -157,7 +163,7 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget { .attr("nowrap", true); const $wrapper = $('