File tree Expand file tree Collapse file tree 3 files changed +16
-3
lines changed
Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 175175 {
176176 "path" : " lib/components/internal/widget-exports.js" ,
177177 "brotli" : false ,
178- "limit" : " 1040 kB" ,
178+ "limit" : " 1100 kB" ,
179179 "ignore" : " react-dom"
180180 }
181181 ],
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import React from 'react';
55import Popover , { PopoverProps } from '~components/popover' ;
66import PopoverBody , { PopoverBodyProps } from '~components/popover/body' ;
77
8+ import FocusTarget from '../common/focus-target' ;
89import createPermutations from '../utils/permutations' ;
910import PermutationsView from '../utils/permutations-view' ;
1011import ScreenshotArea from '../utils/screenshot-area' ;
@@ -59,6 +60,7 @@ export default function () {
5960 return (
6061 < article >
6162 < h1 > Popover text wrapping</ h1 >
63+ < FocusTarget />
6264 < ScreenshotArea >
6365 < PermutationsView
6466 permutations = { triggerPermutations }
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