quasarframework / quasar

Quasar Framework - Build high-performance VueJS user interfaces in record time
https://quasar.dev
MIT License
25.28k stars 3.43k forks source link

Unable to read URL parameter values after the hash (#) in Safari and Chrome on iOS #17073

Closed jmriyaz84 closed 1 month ago

jmriyaz84 commented 1 month ago

What happened?

We want to read the parameters from the URL.

Example Url : https://myapp.com/#/Info/#54784 , I want to read the Id 54784 from this url & save it in Vuex .

Working in Windows & Android , Not working in IOS

What did you expect to happen?

Should work in all OS

Reproduction URL

https://codepen.io/rstoenescu/pen/xxEvBLR

How to reproduce?

Configure the index.js file in the router and add the following code to access the link and store the value in Vuex.

Router.beforeEach(to => { if (to.fullPath.includes("/Info")) { const userId= to.Info.split("#")[2];
store.dispatch("mystore/userId", userId); return { path: "/", hash: "" }; } } Attempting to access values from the store in another component. The system successfully accesses the store values on Windows and Android platforms but encounters issues on iOS.

Flavour

Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)

Areas

Components (quasar)

Platforms/Browsers

iOS

Quasar info output

No response

Relevant log output

No response

Additional context

No response

rstoenescu commented 1 month ago

Hi,

This has nothing to do with Quasar or Vue Router, but more to the iOS Safari browser...