Skip to content

Commit

Permalink
check open direction only when open
Browse files Browse the repository at this point in the history
  • Loading branch information
larsrickert committed Aug 16, 2024
1 parent cc49d80 commit 4e8a500
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/sit-onyx/src/components/OnyxSelect/OnyxSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,6 @@ const allKeyboardOptionIds = computed(() => {
});
const onToggle = async (preventFocus?: boolean) => {
updateOpenDirection();
if (props.readonly) {
open.value = false;
return;
Expand All @@ -171,6 +169,8 @@ const onToggle = async (preventFocus?: boolean) => {
open.value = !wasOpen;
await nextTick();
if (open.value) updateOpenDirection();
// if with managed `open` state after one tick the state was not updated,
// we don't modify our focus state, because we assume that
// the owner did not update `open` on purpose
Expand Down

0 comments on commit 4e8a500

Please sign in to comment.