frankcollins3 / Next-Water-App

Happy, Healthy Water Cycling App that tracks user/human fluid intake.
https://next-water-app.vercel.app
1 stars 0 forks source link

desktop | mobile input discrepancy [9:35pm] #124

Closed frankcollins3 closed 11 months ago

frankcollins3 commented 11 months ago

attempting to do: readme.md for this app and move on. desktop works. but for mobile:

error: /dashboard.tsx -> -> the input to check location and accuweatherAPI provided location weather conditions: 👍 works on desktop 👎 mobile: { key_pressed: undefined }

proposed approach: change state setting function from a keydown function to onChange function. new assumption is that: keys wouldn't be called event.nativeEvent.key on a mobile phone

frankcollins3 commented 11 months ago

this works! and better yet: no "insecure XML Mixed Content" warning atleast on android mobile whereas desktop had to change chrome settings.

        const onChanger = (event: React.ChangeEvent<HTMLInputElement>) => {
            let val = event.target.value                
            setInputVal(val)
        }

[11:18pm]