Skip to content

Commit cd9d14d

Browse files
committed
fix(editor): responsive property field device selector positioning
1 parent 97026bc commit cd9d14d

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@craftile/editor": patch
3+
---
4+
5+
Fix property field responsive device selector positioning.

packages/editor/src/components/ResponsivePropertyField.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ const fieldRenderer = computed(() => {
8989

9090
<template>
9191
<div class="relative">
92-
<div class="flex items-center justify-end gap-3 absolute right-0 top-0 z-5">
92+
<div class="flex items-center justify-end gap-3 absolute right-0 top-0">
9393
<Tooltip title="Reset to default value">
9494
<button
9595
v-if="hasOverride"
@@ -105,12 +105,17 @@ const fieldRenderer = computed(() => {
105105
</Tooltip>
106106

107107
<!-- Device Selector -->
108-
<Select.Root :model-value="[currentDevice]" :collection="deviceCollection" @value-change="handleDeviceSelect">
108+
<Select.Root
109+
:model-value="[currentDevice]"
110+
:collection="deviceCollection"
111+
@value-change="handleDeviceSelect"
112+
:positioning="{ strategy: 'fixed', placement: 'bottom-end' }"
113+
>
109114
<Select.Trigger class="flex items-center gap-1 relative">
110115
<component :is="getIconComponent(currentDeviceData.icon)" class="w-4 h-4 text-gray-600" />
111116
</Select.Trigger>
112117

113-
<Select.Positioner>
118+
<Select.Positioner class="">
114119
<Select.Content class="bg-white border border-gray-200 rounded-lg shadow-lg p-1 min-w-[160px] z-50">
115120
<Select.Item
116121
v-for="item in deviceCollection.items"

0 commit comments

Comments
 (0)