Closed m-zheng closed 1 year ago
Hi @m-zheng, sorry for the late reply, and sorry, I'm not sure if I understand you correctly.
For example, this is how the redirection works with https://github.com/mshibanami/redirect-web/discussions/5, but the address bar is not activated after that.:
https://github.com/mshibanami/redirect-web/assets/1333214/45c8b605-062d-4692-9b8d-8ba74831e809
Would you please send me a video and the redirect rule you tried?
Oh, I found your email reporting the same issue with a video. I understand the issue now.
I see. This seems to be a special case of startpage.com
you want to jump to. Safari on macOS doesn't seem to properly handle the pre-loading websites for the search results of the text typed on the address bar, and the focus remains on the address bar as a result.
I don't think the escape key event triggered by Javascript can manipulate the browser behaviour. But anyways, this is Safari's issue, I guess. I'll investigate a bit more and submit feedback to Apple so that they will address it.
Thank you for reporting it!
Thanks for the update. I will close the ticket for now because the culprit is Safari.
After URL redirection, the address bar is activated by default on macOS Safari. It means any keystroke after URL redirection is sent to the address bar rather than the webpage.
This is counter-intuitive because users normally work on the webpage after typing a URL. For example, people may press
space
key to browse/scroll the webpage after typingbbc.co.uk
in the address bar. This problem does not exist on ipadOS Safari though.A simple fix could be using Javascript to send a
escape
keystroke after URL redirection if the browser is macOS Safari.