open-duelyst / duelyst

Duelyst is a digital collectible card game and turn-based strategy hybrid, developed by Counterplay Games.
Creative Commons Zero v1.0 Universal
3.62k stars 556 forks source link

[P0] Deck selection causes keyboard popup on mobile #220

Open willroberts opened 1 year ago

willroberts commented 1 year ago

Summary

When opening a Practice game on Mobile, the keyboard pop ups. This results in a viewport resize, which causes the game to prompt the user to reload the page.

If we can tweak the accessibility options to avoid the keyboard popup, we can avoid this.

Impacted services

Steps to reproduce

  1. Open https://staging.duelyst.org in Chrome on Android or iOS
  2. Add the page to the home screen
  3. Close Chrome, and then open the app from the home screen
  4. Log in and try to play a practice game
  5. When prompted to select a deck and opponent, the keyboard will pop up

Environment information

willroberts commented 1 year ago

This appears to be caused by .focus() calls in app/ui/views and app/ui/views2.

For example, this.ui.$searchInput.focus(); is called in views/composite/deck_select.js, which causes the keyboard popup during deck selection.