Skip to content

fix(toast): use pointerEvents prop instead of style on ToastList Views#3415

Open
scorpiontyf wants to merge 1 commit into
gluestack:mainfrom
scorpiontyf:fix/toast-pointer-events
Open

fix(toast): use pointerEvents prop instead of style on ToastList Views#3415
scorpiontyf wants to merge 1 commit into
gluestack:mainfrom
scorpiontyf:fix/toast-pointer-events

Conversation

@scorpiontyf

Copy link
Copy Markdown

Description

ToastList.tsx sets pointerEvents: 'box-none' inside the style object on four View components. In React Native, pointerEvents is a prop on View, not a style property — as documented in the React Native View API.

On React Native Web, pointerEvents inside style is silently ignored. The rendered DOM elements receive no pointer-events CSS and default to auto, causing the toast overlay container (position: fixed; left: 0; right: 0) to intercept all pointer events. This makes elements positioned beneath the toast area (e.g. header buttons) unclickable while any toast is visible.

Root cause

// ❌ Broken — pointerEvents in style is ignored by React Native Web
<View style={{ pointerEvents: 'box-none', position: 'fixed', ... }}>
<SafeAreaView style={{ pointerEvents: 'box-none' }}>

Fix

Move pointerEvents from the style object to a direct prop on each affected View:

// ✅ Correct — pointerEvents as a prop is respected by React Native Web
<View pointerEvents="box-none" style={{ position: 'fixed', ... }}>
<SafeAreaView pointerEvents="box-none">

Changes

  • ToastList.tsx: move pointerEvents: 'box-none' from style to prop on:
    • Outer container View (position container per placement)
    • SafeAreaView
    • AnimationView
    • Inner View wrapping toast.component

Impact

Affects any placement that spans full width (top, bottom) on React Native Web. Without this fix, interactive elements beneath the toast zone are unreachable while a toast is displayed.

@vercel

vercel Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

@canechia is attempting to deploy a commit to the GeekyAnts Labs Team on Vercel.

A member of the Team first needs to authorize it.

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.

2 participants