wry icon indicating copy to clipboard operation
wry copied to clipboard

Refresh issue

Open vbornand opened this issue 4 years ago • 9 comments
trafficstars

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

  1. Use an app with react-router
  2. Navigate in another page (not the start page)
  3. 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

vbornand avatar May 05 '21 16:05 vbornand

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

nothingismagick avatar May 05 '21 16:05 nothingismagick

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.

nothingismagick avatar May 05 '21 16:05 nothingismagick

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.

nothingismagick avatar May 05 '21 16:05 nothingismagick

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.

vbornand avatar May 05 '21 17:05 vbornand

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

vbornand avatar May 05 '21 21:05 vbornand

Hi there, could you confirm you still have this issue with the latest version?

Thanks

lemarier avatar May 18 '21 09:05 lemarier

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."

vbornand avatar May 19 '21 16:05 vbornand

Is there a way to just remove the "reload" button from the context menu?

jkelleyrtp avatar Jan 07 '22 07:01 jkelleyrtp

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...😅

keiya01 avatar Jun 13 '22 01:06 keiya01