Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Links in <fieldset disabled> reload the page in firefox #11366

Closed
mattoni opened this issue Mar 22, 2024 · 1 comment
Closed

[Bug]: Links in <fieldset disabled> reload the page in firefox #11366

mattoni opened this issue Mar 22, 2024 · 1 comment
Labels

Comments

@mattoni
Copy link

mattoni commented Mar 22, 2024

What version of React Router are you using?

6.22.3

Steps to Reproduce

Wrap a <Link> in a <fieldset>. It correctly navigates without reloading the page.

If you put <fieldset disabled> on it, the link now reloads the page. This does not happen in safari or chrome.

I suspect Firefox is preventing the event from propagating up in a disabled fieldset (I've found some stack overflow posts alluding to this) but wanted to see if there was any additional information that could be provided here or if it is solvable in this package.

See this for a repro'd example: https://codesandbox.io/p/sandbox/react-router-v6-forked-qkjxcz?file=%2Fsrc%2FApp.js%3A23%2C15

Expected Behavior

The link doesn't reload the whole page.

Actual Behavior

The link reloads the whole page

@mattoni mattoni added the bug label Mar 22, 2024
@timdorr
Copy link
Member

timdorr commented Mar 23, 2024

This is expected behavior, as per that API: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset#disabled

It won't send the mouse events to those elements, so our handling of the click of that link never fires. I would expect the link to be disabled as well, but that's outside of the scope of the router to control.

@timdorr timdorr closed this as not planned Won't fix, can't repro, duplicate, stale Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants