Repository navigation
use-prompt - #998
use-prompt#998benjaminleonard wants to merge 1 commit into
use-prompt#998Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
The reason this doesn't work is Compare to This might not be as big a problem for us as you might think, because our forms are almost all in modals. (The only ones that aren't are instance create and the settings ones.) That means instead of preventing navigation, we can hook in to the modal close callback and prevent modal close if the form is dirty. That should be pretty easy to do and wouldn't rely on anything in RR. However it would leave out the non-modal forms. |
|
Ok that sounds good as a temporary measure – hopefully we're not too far off |
|
It's non-trivial but not ridiculous. This is most of it — the part where it uses the presence of blockers to block history push and pop: I raised it on their Discord, so I'll see if the dev focusing on RR has anything to say about it before making any plans. |
|
Gonna close this until we get an update. |
Added in case it was an easy task – from remix-run/react-router#8139 (comment)
For whatever reason
navigator.blockis always undefined. Pushing for reference.