fix: mobile market filters not applying on Android Chrome (#412)#413
Merged
Conversation
- Add touch-action: manipulation to MarketsTierFilter buttons to prevent Android Chrome from intercepting tap events as horizontal scroll gestures inside the overflow-x-auto container. Without this, onClick can be delayed or suppressed on Android touch devices. - Pass marketFilter prop from MarketsTable to MarketsTableContent so that MarketCardView (mobile) gets the correct key and force-remounts on filter change, matching the intended behavior. Fixes #412
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Closes #412
On Android Chrome, tapping the A/B/D market filter buttons visually highlights the selected filter but does not update the displayed market list.
Root Cause
Two bugs found:
1. Touch event conflict with
overflow-x-auto(primary)In
MarketsTierFilter.tsx, filter buttons on mobile are wrapped in anoverflow-x-autocontainer. On Android Chrome, this causes the browser's touch handler to be ambiguous — it can't immediately tell if the gesture is a horizontal scroll or a tap. Without explicittouch-actionCSS, Chrome can delay or suppress theonClickevent entirely.The visual state (button highlight) can still update, giving the false impression that the filter registered, while the
onChangecallback never fires reliably.Fix: Added
style={{ touchAction: 'manipulation' }}to each filter button. This tells Chrome the element is a tap target, not a scroll handle —onClickfires immediately without delay or cancellation.2.
marketFilterprop not passed toMarketsTableContent(secondary)MarketsTablerendersMarketsTableContentwithout themarketFilterprop, soMarketCardView(the mobile card layout) always receiveskey="all"and never force-remounts when the filter changes. The data IS correctly filtered via the hook'spaginatedData, but the intended remount-on-filter behavior is broken.Fix: Pass
marketFilter={marketFilter}fromMarketsTabletoMarketsTableContent.Changes
MarketsTierFilter.tsx: Addtouch-action: manipulationto filter buttonsMarketsTable.tsx: PassmarketFilterprop toMarketsTableContentTesting