Skip to content

fix(shops): hide popover on mobile to prevent purchase blocking (#10917)#15606

Open
ttpss930141011 wants to merge 1 commit intoHabitRPG:developfrom
ttpss930141011:fix/10917-mobile-shop-popover
Open

fix(shops): hide popover on mobile to prevent purchase blocking (#10917)#15606
ttpss930141011 wants to merge 1 commit intoHabitRPG:developfrom
ttpss930141011:fix/10917-mobile-shop-popover

Conversation

@ttpss930141011
Copy link
Copy Markdown

@ttpss930141011 ttpss930141011 commented Feb 8, 2026

Fixes #10917

Changes

On mobile browsers (<768px), the shop item popover (triggered by hover focus in Bootstrap-Vue b-popover) activates on touch and covers the item card, preventing users from tapping to purchase pinned items. Since the popover cannot be easily dismissed on touch devices, it effectively blocks interaction with the shop.

This fix adds a mobile check to conditionally disable the popover on small screens:

  • isMobile data property — checks window.innerWidth < 768 on mount
  • shouldShowPopover computed — returns showPopover && !isMobile, replacing the original v-if="showPopover" on the <b-popover> component
  • handleResize method + resize event listener — updates isMobile on viewport changes (e.g., device rotation)

On desktop, popover behavior is unchanged. On mobile, users tap items to open the purchase modal directly without the popover blocking the UI.

Screenshots

Desktop — popover works normally on hover:

Mobile BUG (before fix) — popover covers UI on touch, blocking interaction:

Mobile FIXED (after fix) — no popover, clean UI:

File changed: website/client/src/components/shops/shopItem.vue (+10 lines)


UUID: 854d383c-ce47-4659-96b6-e4603aadd69e

@ttpss930141011 ttpss930141011 force-pushed the fix/10917-mobile-shop-popover branch from 4a4ab5c to 4ae8e31 Compare February 8, 2026 00:20
…tRPG#10917)

On mobile browsers, the shop item popover triggers on touch and covers
the item, preventing users from clicking to purchase pinned items.

This fix:
- Adds isMobile data property checking window.innerWidth < 768
- Adds shouldShowPopover computed that disables popover on mobile
- Adds resize listener to handle device rotation

Closes HabitRPG#10917
@ttpss930141011 ttpss930141011 force-pushed the fix/10917-mobile-shop-popover branch from 4ae8e31 to c967cb0 Compare February 8, 2026 00:23
@SabreCat SabreCat force-pushed the develop branch 2 times, most recently from 2d54f93 to d465efa Compare April 8, 2026 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Items can't be purchased on mobile browser due to tooltip overlap

1 participant