pinballmap / pbm-react

PBM React Native: iOS & Android Apps
https://pinballmap.com/app
GNU General Public License v3.0
33 stars 9 forks source link

Can’t scroll in the location description textbox #539

Closed RyanTG closed 1 week ago

RyanTG commented 6 months ago

When editing a location and editing the location notes field, if the existing notes extend beyond the visible textbox window, you can’t scroll to the bottom.

This isn’t the case on the same field in the location submission form. Might just be a simple param fix.

ErikGraciosa commented 6 months ago

Tried to recreate in android and was able to scroll to the bottom when editting location notes.

https://github.com/pinballmap/pbm-react/assets/70562690/6f7a7b37-95e2-475a-a334-33ed1b8ad112

RyanTG commented 5 months ago

What about at a location where the location notes already filled in? I’m unable to replicate it if I type in a long note - in that situation it scrolls just fine, like it is correctly aware of the number of lines. But I experience the issue at locations where the description is already long.

Correction: actually, in that case it’s inconsistent. I experience the issue with Star Worlds but not with Revenge Of. Strange…

Star Worlds Arcade https://pinballmap.com/map/?by_location_id=1845

Revenge Of https://pinballmap.com/map/?by_location_id=16910

ErikGraciosa commented 5 months ago

On android, I was able to scroll for both of those locations.

RyanTG commented 5 months ago

Must be iOS-specific. Beth was able to replicate.

RyanTG commented 5 months ago

This seems sufficient https://github.com/pinballmap/pbm-react/commit/0bf046bb6be2d0a4832db2205ab6985c5d606c42

I gave multiline textinputs a minimum height, and made them all grow in height as the content grows.

bpoore commented 5 months ago

Confirmed I am not seeing this issue anymore with the update on master. Nice!

RyanTG commented 3 months ago

I think we need to revisit this. While the textInput growing in size seems cool, it presents an issue where the input doesn't always successfully avoid the keyboard.

As a result, I think we need to go back to using a fixed height for these inputs. The problem originally found in this issue still persists on iOS, but I have more details.

I feel like the solution is to somehow measure the height of the content when you go to edit the box, because I think that measurement/awareness of the content height is being lost and that's the problem.

RyanTG commented 3 months ago

Ok, I resolved it. The problem was with

placeholder={description || "Location description..."}

I can't say exactly why, but the above looks like the description was being used as a placeholder.

https://github.com/pinballmap/pbm-react/commit/e960720d289b2d37f90631444097f81a39a9d3f8

RyanTG commented 1 week ago

Oh man. Still an issue.

I don’t think I fixed anything here https://github.com/pinballmap/pbm-react/commit/e960720d289b2d37f90631444097f81a39a9d3f8#diff-049694dfb76f22c83736a4c1ae6ed790358368ea0f45299de47b9756732098a8

RyanTG commented 1 week ago

Ok, now fixed? https://github.com/pinballmap/pbm-react/commit/fe501db183f3af49928909eaf856b6cc873877e2