Skip to main content
GoodFirstPicks
DashboardIssuesReposLeaderboard

GoodFirstPicks by Leaveitblank © 2026

CreatorRequest a RepoPrivacy PolicyTerms of Service
TypeScript Bug: Type '"bounding-box"' is not assignable to type 'PointerEvents | undefined'. (ts 2322) | GoodFirstPicks

TypeScript Bug: Type '"bounding-box"' is not assignable to type 'PointerEvents | undefined'. (ts 2322)

facebook/react 2 comments 1mo ago
View on GitHub
lowopenScope: clearSkill match: yesReactJavaScriptTypeScript

Why this is a good first issue

The issue involves updating TypeScript type definitions to include a valid SVG attribute value.

AI Summary

The issue reports a TypeScript error where 'bounding-box' is not accepted as a valid value for the pointerEvents attribute in SVG elements. This requires updating the TypeScript type definitions to include all valid SVG pointer-events values. The fix is localized to type definitions with clear requirements from MDN documentation.

Issue Description

React version: 19.2.0

Steps To Reproduce

  1. Add this svg into a TypeScript React component: html <svg style={{ pointerEvents: "bounding-box" }} />
  2. Error: Type '"bounding-box"' is not assignable to type 'PointerEvents | undefined'. (ts 2322)

Link to code example: https://codesandbox.io/p/devbox/flamboyant-tu-q2v7g5 (It's a JS code sandbox but you can hover over the property to see that bounding-box is not in the property list that the editor renders.)

The current behavior

Gives a TS error.

The expected behavior

Should accept all valid values as listed (for example) here: https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Attribute/pointer-events#usage_notes

GitHub Labels

Status: UnconfirmedResolution: Stale

Want to work on this?

Claim this issue to let others know you're working on it. You'll earn 10 points when you complete it!

Risk Flags

  • TypeScript type definitions
Loading labels...

Details

Points10 pts
Difficultylow
Scopeclear
Skill Matchyes
Test Focusedno