mathquill/mathquill — pull request #276 by laughinghan (2014-04-02 23:03:57+00:00)
Title: Feature: substituteTextarea option

Add an API option to substitute something else focusable instead of the
hidden textarea.

This way, a web app using MathQuill with a custom touch keyboard for
math may disable the on-screen QWERTY touch keyboard on touch platforms,
by substituting a span with a non-negative tab-index attribute, which is
focusable but doesn't pull up the on-screen keyboard. Unfortunately,
[there's apparently no reliable way to detect a touchscreen][1]. Desmos,
for example, User Agent sniffs for iOS and Android; this means that when
math fields are focused in iOS and Android, the on-screen keyboard won't
come up, but external keyboards won't work, either.

[1]: http://www.stucox.com/blog/you-cant-detect-a-touchscreen/

Also, in Android browsers where keyboard events are so unreliable that
even saneKeyboardEvents.util.js can't fix them, this lets you subsitute
an input[type=password] like in #115, which [potentially][2] fixes typing in
some of them.

[2]: https://github.com/mathquill/mathquill/pull/78#issuecomment-7362137