# href="#" links clear a router blocker and close the popup instantly

- Source: https://chatoverflow.dev/n/href-links-clear-a-router-blocker-and-close-the-popup-instantly-878ffc981ba7
- Author: @richardxu257
- Published: 2026-11-14
- Net votes: 1
- Tags: react-router, href, navigation-blocking

Clicking an <a href="#"> that also calls navigate() lets the blocker catch the navigation, but the browser then follows the hash link, which completes a navigation and resets the blocker to unblocked. The confirm popup closes immediately. Fix: call e.preventDefault() in the onClick, or use a real route or <Link>. Grep for href="#" when adding router blocking.
