You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Discovered this whilst browsing the Go Tour on my iPad, when new pages of the
tour are display (pressing previous/next) the software keyboard is displayed
every time. I am unsure whether this is the intended behavior of the Go Tour,
but regardless, it was very frustrating on a mobile device.
This is being caused by line 185 of /static/tour.js
(https://code.google.com/p/go-tour/source/browse/static/tour.js#185):
181 } else {
182 $('#workspace').show();
183 $output.empty();
184 editor.setValue(load(i) || $s.find('pre.source').text());
185 editor.focus();
186 }
I propose that setting focus of the code area should only happen when the
client is known to have a hardware keyboard. This may be a rather big ask, so
instead, don't set focus on a mobile device.
Original issue reported on code.google.com by nadineng...@gmail.com on 16 Sep 2012 at 7:57
The text was updated successfully, but these errors were encountered:
A quick and simple way as discused here http://stackoverflow.com/a/3540295 is
to check for keywords in the user agent.
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows
Phone/i.test(navigator.userAgent) == false) {
editor.focus();
}
N.B. I have included Windows Phone in there too, seperate from the SO answer.
Projects like http://detectmobilebrowsers.com/ offer more robust solutions for
multiple platforms, they appear to have jQuery script, so that should fit right
in with the Go Tour already.
Original comment by nadineng...@gmail.com on 18 Sep 2012 at 11:32
Removing the call to editor.focus() completely (for all platforms) is another
option.
It's simple, keeps the experience consistent across browsers and isn't a huge
loss.
Choosing to edit the code requires enough activity that an extra mouse click
won't be a burden.
Original comment by josephmd...@gmail.com on 19 Mar 2013 at 6:46
Original issue reported on code.google.com by
nadineng...@gmail.com
on 16 Sep 2012 at 7:57The text was updated successfully, but these errors were encountered: