【问题标题】:Force Toolbar Search to Lose Focus After Search on Mobile to Hide Keyboard在移动设备上搜索以隐藏键盘后强制工具栏搜索失去焦点
【发布时间】:2015-05-10 18:31:32
【问题描述】:

我在带有工具栏搜索的移动网站上使用免费的 jqgrid。

工具栏搜索正在工作,但手机上的键盘保持活动状态并覆盖了网格。

如何配置jqgrid,这样当用户在手机上点击Enter或Go按钮后,工具栏搜索栏会失去焦点,手机键盘会消失并显示网格。

http://www.ok-soft-gmbh.com/jqGrid/OK/GetFilteredData.htm

我的第一次尝试是搜索后工具栏太模糊,使用以下方法不起作用

.jqGrid('filterToolbar', {
            searchOperators: true, afterSearch: function () {
                var s;
        s = jQuery("#jqGrid").blur();
    },
        });

【问题讨论】:

    标签: mobile jqgrid free-jqgrid


    【解决方案1】:

    我厌倦了在网格上调用focus方法,这使得手机上的键盘在按下Go按钮开始搜索后消失。

    .jqGrid('filterToolbar', {
            searchOperators: true, afterSearch: function () {
                var s;
                s = jQuery("#jqGrid").blur();
                },
          });
    

    【讨论】:

      猜你喜欢
      • 2011-03-08
      • 2020-06-06
      • 2022-11-15
      • 2023-02-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多