ipfs-webui icon indicating copy to clipboard operation
ipfs-webui copied to clipboard

Fix Context Menu Behavior in Dropdown Component

Open george-hub331 opened this issue 6 months ago • 0 comments

Fixes #1617

Summary

This PR improves the context menu behavior while following the TypeScript migration guidelines. It ensures proper typing and modern React patterns while fixing the context menu functionality.

Changes

Context Menu Improvements

  • Ensured only one context menu is displayed at a time
  • Improved context menu event handling
  • Added Escape key handler to dismiss context menus
  • Prevent browser native context menu from coming up

TypeScript Migration

  • Converted updated files to TypeScript (.tsx)
  • Added proper TypeScript interfaces for all props
  • Removed PropTypes in favor of TypeScript interfaces
  • Used modern functional components with proper typing
  • Added proper event type definitions
  • Follows project's TypeScript guidelines

george-hub331 avatar Mar 30 '25 13:03 george-hub331