Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import ColorSchemeWrapper from '@components/ColorSchemeWrapper';
import PressableWithFeedback from '@components/Pressable/PressableWithFeedback';
import useStyleUtils from '@hooks/useStyleUtils';
import useThemeStyles from '@hooks/useThemeStyles';
import * as DeviceCapabilities from '@libs/DeviceCapabilities';
import {hasHoverSupport} from '@libs/DeviceCapabilities';
import CONST from '@src/CONST';
import type {AutoCompleteSuggestionsPortalProps} from './AutoCompleteSuggestionsPortal';
import type {RenderSuggestionMenuItemProps} from './types';
Expand Down Expand Up @@ -92,7 +92,7 @@ function BaseAutoCompleteSuggestions<TSuggestion>({
<Animated.View
style={[styles.autoCompleteSuggestionsContainer, animatedStyles]}
onPointerDown={(e) => {
if (DeviceCapabilities.hasHoverSupport()) {
if (hasHoverSupport()) {
return;
}
e.preventDefault();
Expand All @@ -108,6 +108,7 @@ function BaseAutoCompleteSuggestions<TSuggestion>({
removeClippedSubviews={false}
showsVerticalScrollIndicator={innerHeight > rowHeight.get()}
extraData={[highlightedSuggestionIndex, renderSuggestionMenuItem]}
style={styles.overscrollBehaviorContain}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for using contain instead of none?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use contain so that the default overscroll behavior on the element that we scroll is still preserved while still preventing the scroll chaining.

image

/>
</ColorSchemeWrapper>
</Animated.View>
Expand Down
Loading