aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Scripts/keyboard.js
blob: 21771eb8e827b7ffe0525fad182bd40d22ffb41b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
(async function () {
    await CefSharp.BindObjectAsync("keyboard", "bound");

    var inputs = document.getElementsByTagName('input');
    var i = 0;

    do {

        var type = inputs[i].type;

        if (type == 'text' || type == 'email' || type == 'password' || type == 'search' || type == 'date' || type == 'url' || type == 'time' || type == 'tel' || type == 'number') {
            inputs[i].onfocus = function () {
                keyboard.openKeyboard(type);
            }
            inputs[i].onblur = function () {
                keyboard.closeKeyboard();
            }
        }
    }
    while (inputs[++i])
})();