Skip to content

Commit

Permalink
fix(SelectBase): Resolve inconsistent popover in Chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
m7kvqbe1 committed Mar 25, 2022
1 parent 6b4fd0f commit dcbd104
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import mergeRefs from 'react-merge-refs'
import { ArrowButton } from '../Select/ArrowButton'
import { ClearButton } from '../Select/ClearButton'
import { ComponentWithClass } from '../../common/ComponentWithClass'
import { FloatingBox } from '../../primitives/FloatingBox'
import { SelectChildWithStringType } from './types'
import { StyledInlineButtons } from './partials/StyledInlineButtons'
import { StyledInput } from './partials/StyledInput'
Expand All @@ -19,6 +18,7 @@ import { StyledTextInput } from './partials/StyledTextInput'
import { StyledTooltip } from './partials/StyledTooltip'
import { useExternalId } from '../../hooks/useExternalId'
import { useStatefulRef } from '../../hooks/useStatefulRef'
import { StyledFloatingBox } from './partials/StyledFloatingBox'

type ComboboxReturnValueType = UseComboboxReturnValue<SelectChildWithStringType>
type SelectReturnValueType = UseSelectReturnValue<SelectChildWithStringType>
Expand Down Expand Up @@ -134,14 +134,14 @@ export const SelectLayout: React.FC<SelectLayoutProps> = ({
<StyledOptions {...menuProps}>{children}</StyledOptions>
</StyledOptionsWrapper>
</StyledSelect>
<FloatingBox
<StyledFloatingBox
placement="bottom"
scheme="dark"
isVisible={hasHover && isEllipsisActive(floatingBoxTarget)}
targetElement={floatingBoxTarget}
>
<StyledTooltip>{value}</StyledTooltip>
</FloatingBox>
</StyledFloatingBox>
</>
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import styled from 'styled-components'

import { FloatingBox } from '../../../primitives/FloatingBox'

export const StyledFloatingBox = styled(FloatingBox)`
pointer-events: none;
`

0 comments on commit dcbd104

Please sign in to comment.