File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,15 @@ $trigger-underline-offset: 0.25em;
2020 & .no-wrap {
2121 white-space : nowrap ;
2222 }
23+
24+ // When the trigger text is set to be ellipsized, render the focus ring on the root element instead of the trigger,
25+ // to prevent it from being cropped by its `overflow: hidden` rule.
26+ // We do this in only this case because when the trigger has multiple lines of texts its height can differ from the root element.
27+ & :has (.trigger-type-text-inline.overflow-ellipsis :focus , .trigger-type-text.overflow-ellipsis :focus ) {
28+ @include focus-visible .when-visible-unfocused {
29+ @include styles .focus-highlight (1px );
30+ }
31+ }
2332}
2433
2534.root-filtering-token {
@@ -77,8 +86,10 @@ $trigger-underline-offset: 0.25em;
7786 outline : none ;
7887 }
7988
80- @include focus-visible .when-visible {
81- @include styles .focus-highlight (1px );
89+ & :not (.overflow-ellipsis ) {
90+ @include focus-visible .when-visible {
91+ @include styles .focus-highlight (1px );
92+ }
8293 }
8394}
8495
You can’t perform that action at this time.
0 commit comments