wry
wry copied to clipboard
Refresh issue
Describe the bug On Windows, in the contextual menu, there is "Refresh..." (or if you do Ctrl-R), With a spa application with a custom router (for example react-router), the refresh fails with the message "custom-protocol-taurilocalhost’s server IP address could not be found."
Steps To Reproduce
- Use an app with react-router
- Navigate in another page (not the start page)
- Ctrl-R or Refresh in the menu
Expected behavior The refresh works or add an option to disable the refreshing.
Platform and Versions (please complete the following information): OS: Windows 10.0.19042 x64 Rustc: 1.51.0
Thanks, this is indeed something to think about. We may actually even need to push this one crate lower in the chain to tau - but let's hear what @wusyong & @lemarier have to say
Now, this isn't a solution per sé, but you can always consider overriding the context-menu (ctrl-click) and the ctrl-r hook. That said, I think that we will probably have to hook the event ourselves anyway, since basically we need to do a LOT of reinitialization probably.
Also, in the context of apps, I am not sure that a "refresh" action will even really always make sense. Its like - you have a memory crash so reload. I don't think I have ever wanted something like Photoshop or VS Code to even have a "reload" event. I am not sure what that would or should even do, to be honest.
Also, in the context of apps, I am not sure that a "refresh" action will even really always make sense. Its like - you have a memory crash so reload. I don't think I have ever wanted something like Photoshop or VS Code to even have a "reload" event. I am not sure what that would or should even do, to be honest.
In my own opinion, you can completely disabled the Refresh. In an app, I don't think it is useful.
It seems currently not possible to customize the context menu and disable it completely in not a solution because Copy, Paste, ... options are required. https://github.com/MicrosoftEdge/WebViewFeedback/issues/80
Hi there, could you confirm you still have this issue with the latest version?
Thanks
Hi @lemarier ,
There is still the issue with the version 1.0.0-beta.1
The refresh fails with the message "custom-protocol-taurilocalhost’s server IP address could not be found."
Is there a way to just remove the "reload" button from the context menu?
I investigated the way to disable context menu.
- [x] On windows, we can disable default context menu. issue is here
- [ ] On macos, TODO
- [ ] On linux, TODO
Oh I see the way to disable default context menu already exist...(https://github.com/tauri-apps/wry/issues/30). If we need to disable only reload menu, this issue is helpful But we need to fix refresh issue...😅