简体   繁体   English

在IMF中使用IME和“场景”整合输入字段?

[英]integrating input fields using IME with “Scene” in samsung smart tv?

Below mentioned code is able to show me keypad but the problem is after pressing any key it gives me "body is not activated....." because of 下面提到的代码可以向我显示键盘,但问题是在按任意键后,它提示我"body is not activated....."原因是

document.getElementById("userid").focus();

But If I remove document.getElementById("userid").focus(); 但是,如果我删除document.getElementById("userid").focus(); Keypad will not generate and Keys are started working 键盘将不会生成,并且按键开始工作

Sample Code for IME IME的示例代码

SceneSignIn.prototype.handleShow = function (options) {
    alert("SceneSignIn.handleShow()");
    // this function will be called when the scene manager shows this scene
    this.ime_plainText = new IMEShell("userid");    
    this.ime_passwordText = new IMEShell("password");
    document.getElementById("userid").focus();
}

Check if: 检查:

  1. You have the default on new javascript application anchor element in index body. 您在索引正文中具有新的javascript应用程序锚点元素的默认值。 This: <a href="javascript:void(0);" id="anchor" onkeydown="main.keyDown(event);"></a> 这: <a href="javascript:void(0);" id="anchor" onkeydown="main.keyDown(event);"></a> <a href="javascript:void(0);" id="anchor" onkeydown="main.keyDown(event);"></a>
  2. Your focus management in the application is not being interfered when you give the input element focus. 为输入元素赋予焦点时,不会干扰应用程序中的焦点管理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM