Yesterday I found out that my Babylon app ran almost* perfectly on my tablet without having to make any changes. Just by virtue of using the observables provided by Babylon itself Portability to mobile is one of Babylonâs major strengths I think. Thank you for that.
- Unfortunately I wouldnât be posting this to Bug reports if there was an issue where this portability broke down. I was using Chrome on Android (edit: the tablet version, phone version is fine) which does not have âmobileâ in its UA string, leading to this check:
failing and not showing the prompt. I was using the tablet without a physical keyboard and that left me with no option to enter text. The issue of course shows up in this PG as well:
https://www.babylonjs-playground.com/#UWS0TS
Of course I know there is no way to enable the virtual keyboard from JavaScript so this kludge is necessary. But checking this through the UA string breaks down in borderline cases such as this. Perhaps the caller should be able to supply a predicate function to decide whether a device is to be considered âmobileâ in this sense or not. Also, I think the default heuristic could be smarter, for example have the strings âiPadâ, âiPhoneâ or âAndroidâ also trigger the mobile behavior.
When I have the time I can do a PR for that. The change is simple enough. Just want to confirm whether there is a reason you are doing it this way. And are there any other places in the source code where prompts need to be displayed, or just this one?