зеркало из https://github.com/mozilla/gecko-dev.git
Bug 796544 - Pass the inputmode attribute value to mozKeyboard. r=cpeterson
This commit is contained in:
Родитель
995765df19
Коммит
6a13d90e9a
|
@ -259,12 +259,17 @@ function getJSON(element) {
|
|||
}
|
||||
}
|
||||
|
||||
// If Gecko knows about the inputmode attribute, use that value.
|
||||
// Otherwise, query the attribute explicitly, but be sure to convert
|
||||
// to lowercase
|
||||
let inputmode = element.inputmode || element.getAttribute('inputmode');
|
||||
// Gecko supports the inputmode attribute on text fields (but not textareas).
|
||||
// But it doesn't recognize "verbatim" and other modes that we're interested
|
||||
// in in Gaia, and the inputmode property returns "auto" for any value
|
||||
// that gecko does not support. So we must query the inputmode attribute
|
||||
// with getAttribute() rather than just using the inputmode property here.
|
||||
// See https://bugzilla.mozilla.org/show_bug.cgi?id=746142
|
||||
let inputmode = element.getAttribute('inputmode');
|
||||
if (inputmode) {
|
||||
inputmode = inputmode.toLowerCase();
|
||||
} else {
|
||||
inputmode = '';
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
Загрузка…
Ссылка в новой задаче