From 63115d51e5a888ab39083502e8ef2aba8da7f179 Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Tue, 29 Nov 2022 14:47:23 -0500 Subject: [PATCH] fixes #1036 --- docs/resources/changelog.md | 1 + src/components/popup/popup.ts | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/resources/changelog.md b/docs/resources/changelog.md index 721b48e4..5eb3b0fe 100644 --- a/docs/resources/changelog.md +++ b/docs/resources/changelog.md @@ -13,6 +13,7 @@ New versions of Shoelace are released as-needed and generally occur when a criti - Added `header-actions` slot to `` and `` - Fixed a bug in `` where `sl-selection-change` was emitted when the selection didn't change [#1030](https://github.com/shoelace-style/shoelace/pull/1030) - Fixed a bug in `` that caused the border to render incorrectly when hovering over icons inside buttons [#1035](https://github.com/shoelace-style/shoelace/issues/1035) +- Fixed an incorrect default for `flip-fallback-strategy` in `` that caused the fallback strategy to be `initial` instead of `best-fit`, which is inconsistent with Floating UI's default [#1036](https://github.com/shoelace-style/shoelace/issues/1036) - Improved IntelliSense in VS Code, courtesy of [Burton's amazing CEM Analyzer plugin](https://github.com/break-stuff/cem-plugin-vs-code-custom-data-generator) - Improved accessibility of `` so the alert is announced and the close button has a label - Removed unused aria attributes from `` diff --git a/src/components/popup/popup.ts b/src/components/popup/popup.ts index 749988eb..9639c892 100644 --- a/src/components/popup/popup.ts +++ b/src/components/popup/popup.ts @@ -136,10 +136,10 @@ export default class SlPopup extends ShoelaceElement { /** * When neither the preferred placement nor the fallback placements fit, this value will be used to determine whether - * the popup should be positioned as it was initially preferred or using the best available fit based on available - * space. + * the popup should be positioned using the best available fit based on available space or as it was initially + * preferred. */ - @property({ attribute: 'flip-fallback-strategy' }) flipFallbackStrategy: 'best-fit' | 'initial' = 'initial'; + @property({ attribute: 'flip-fallback-strategy' }) flipFallbackStrategy: 'best-fit' | 'initial' = 'best-fit'; /** * The flip boundary describes clipping element(s) that overflow will be checked relative to when flipping. By