diff --git a/apps/client/src/widgets/attribute_widgets/attribute_detail.ts b/apps/client/src/widgets/attribute_widgets/attribute_detail.ts index 2a7a55aef..8ae3ae674 100644 --- a/apps/client/src/widgets/attribute_widgets/attribute_detail.ts +++ b/apps/client/src/widgets/attribute_widgets/attribute_detail.ts @@ -12,6 +12,7 @@ import shortcutService from "../../services/shortcuts.js"; import appContext from "../../components/app_context.js"; import type { Attribute } from "../../services/attribute_parser.js"; import { focusSavedElement, saveFocusedElement } from "../../services/focus.js"; +import { isExperimentalFeatureEnabled } from "../../services/experimental_features.js"; const TPL = /*html*/`
@@ -309,6 +310,8 @@ interface SearchRelatedResponse { count: number; } +const isNewLayout = isExperimentalFeatureEnabled("new-layout"); + export default class AttributeDetailWidget extends NoteContextAwareWidget { private $title!: JQuery; private $inputName!: JQuery; @@ -579,6 +582,13 @@ export default class AttributeDetailWidget extends NoteContextAwareWidget { .css("top", y - offset.top + 70) .css("max-height", outerHeight + y > height - 50 ? height - y - 50 : 10000); + if (isNewLayout) { + this.$widget + .css("top", "unset") + .css("bottom", 70) + .css("max-height", "80vh"); + } + if (focus === "name") { this.$inputName.trigger("focus").trigger("select"); }