{"id":28559094,"url":"https://github.com/toastdriven/react-hover-test","last_synced_at":"2026-01-31T00:33:43.159Z","repository":{"id":207206615,"uuid":"718681225","full_name":"toastdriven/react-hover-test","owner":"toastdriven","description":"This is to demonstrate a weird bug in React around `onMouseLeave`.","archived":false,"fork":false,"pushed_at":"2023-11-16T15:21:12.000Z","size":252,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-09T06:45:20.527Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/toastdriven.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-11-14T15:29:15.000Z","updated_at":"2023-11-14T15:30:13.000Z","dependencies_parsed_at":"2023-11-14T16:45:18.176Z","dependency_job_id":"2d21e624-9c7f-4bae-8b81-1c20a1c77f77","html_url":"https://github.com/toastdriven/react-hover-test","commit_stats":null,"previous_names":["toastdriven/react-hover-test"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/toastdriven/react-hover-test","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toastdriven%2Freact-hover-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toastdriven%2Freact-hover-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toastdriven%2Freact-hover-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toastdriven%2Freact-hover-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toastdriven","download_url":"https://codeload.github.com/toastdriven/react-hover-test/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toastdriven%2Freact-hover-test/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28925074,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T22:32:35.345Z","status":"ssl_error","status_checked_at":"2026-01-30T22:32:31.927Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-10T08:36:03.374Z","updated_at":"2026-01-31T00:33:43.142Z","avatar_url":"https://github.com/toastdriven.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React `onMouseLeave` Bug Reproduction\n\nThis is to demonstrate a weird bug in React. The `onMouseLeave` events don't seem to behave correctly (or at least not as expected).\n\n# Expected Behavior\n\nThis app shows two lists (all options \u0026 active options).\n\nWhen you mouse over an option in the _\"All Options\"_ list, it should highlight **same** option in the _\"Active Options\"_ list.\n\nWhen you mouse out of the option, it should remove the highlight from **all** active options.\n\nThese events are hooked up as \"low\" in the DOM as possible, on the `\u003cli\u003e` tags in the list.\n\n\u003e Note: A Preact example with almost the same code behaves as expected \u0026 is included at `./preact-hover-test.html`. Here's what it looks like:\n\u003e ![preact_version.gif](https://github.com/toastdriven/react-hover-test/blob/main/preact_version.gif?raw=true)\n\n# Actual Behavior\n\n`onMouseEnter` seems to behave correctly, and correctly adds the option to the active options. The highlight then takes effect.\n\nHowever, when the mouse **leaves** the `\u003cli\u003e`, the `onMouseLeave` doesn't seem to trigger, leaving the highlight in place.\n\nIt's only upon the mouse leaving the _parent_ tag that the `onMouseLeave` seems to trigger. In this case, it's the `\u003cul\u003e` tag, but I experienced the same bug when I just used `\u003cdiv\u003e` tags for everything.\n\nHere's a gif of it in action:\n\n![react_version.gif](https://github.com/toastdriven/react-hover-test/blob/main/react_version.gif?raw=true)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoastdriven%2Freact-hover-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoastdriven%2Freact-hover-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoastdriven%2Freact-hover-test/lists"}