Skip to content

Commit

Permalink
Prevent widows and specify css class for zindex
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeyGuyDylan committed May 15, 2024
1 parent 193555d commit 79320c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useMemo, useCallback, type FC } from 'react';
import FormFieldset from 'calypso/components/forms/form-fieldset';
import FormLegend from 'calypso/components/forms/form-legend';
import InfoPopover from 'calypso/components/info-popover';
import { preventWidows } from 'calypso/lib/formatting';
import { getProductPartsFromAlias } from 'calypso/my-sites/checkout/src/hooks/use-prepare-products-for-cart';
import { useDispatch } from 'calypso/state';
import { recordTracksEvent } from 'calypso/state/analytics/actions/record';
Expand Down Expand Up @@ -79,7 +80,7 @@ const QuantityDropdown: FC< QuantityDropdownProps > = ( { product, siteId, onCha
screenReaderText={ translate( 'Learn more' ) }
className="product-lightbox__variants-dropdown--popover"
>
{ PRODUCT_OPTIONS_HEADER_INFO_CONTENT[ product?.productSlug ] }
{ preventWidows( PRODUCT_OPTIONS_HEADER_INFO_CONTENT[ product?.productSlug ] ) }
</InfoPopover>
</FormLegend>
<SelectDropdown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,6 @@
// The lightbox z-index is 100200, consequences of updating the popover z-index
// to higher than that are unclear, so we'll manually set it to 100200 here so we
// can see the popover in the lightbox.
.popover {
.popover.product-lightbox__variants-dropdown--popover {
z-index: 100200;
}

0 comments on commit 79320c9

Please sign in to comment.