tobymao / 18xx

A platform for playing 18xx games online!
https://18xx.games
Other
298 stars 186 forks source link

[mobile: iOS/android] setting playercount gets overriden by helper logic #11071

Open benjaminxscott opened 3 months ago

benjaminxscott commented 3 months ago

In a browser on iOS, values for min/max players are reset to defaults when focusing the field and entering a new value e.g. if max_players is 7 then tapping min_players and entering 5 will reset to 7

Workaround is to long press on the field and 'Select All', then enter a value

Likely due to how we reset the element value to max/min based in the validation logic

https://github.com/tobymao/18xx/blob/master/assets/app/view/create_game.rb#L532

Since we have more frontend validation and messaging now, I'd propose:

  1. don't reset those values (elm.value)
  2. add helper text to the field label e.g. Max Players (7)
  3. dogfood to make sure it's usable
benjaminxscott commented 3 months ago

To note I tried to setup BrowserStack to test this, but they couldn't launch any browsers due to

currently unavailable due to heavy traffic. Please try again later.

fanman80 commented 3 months ago

I experienced the same thing on an android device.

Thanks for the work around.