You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Android设备Tabulator下拉编辑器字段键盘弹出后消失问题的修复咨询

Android设备Tabulator下拉编辑器字段键盘弹出后消失问题的修复咨询

我遇到了一个棘手的问题:当使用Tabulator的下拉编辑器时,弹出的键盘会导致表格触发 resize,进而调用table.redraw(),这会让编辑字段失去焦点,键盘直接消失——不过目前我还没法100%确定这个触发逻辑。

这个问题出现在**三星平板(Android 13系统)**上,而且只在Chromium内核的浏览器(比如Chrome、Edge)里复现,用Firefox测试是正常的。

下面是问题的演示动图:
Gif showing the problem

动图来自Tabulator官方文档的可编辑表格示例。

我用来复现问题的代码如下:

JavaScript代码

var data=[
{location:"United Kingdom"},
{location:"Germany"}
]
//Build Tabulator

var table = new Tabulator("#example-table", {
  height: "311px",
  data:data,
  columns: [
  
    {
      title: "Location",
      field: "location",
      width: 130,
      editor: "list",
      editorParams: {
        autocomplete: "true",
        allowEmpty: true,
        listOnEmpty: true,
        valuesLookup: true
      }
    },
   
  ],
});

HTML代码

<link href="https://unpkg.com/tabulator-tables@6.3.1/dist/css/tabulator.min.css" rel="stylesheet">
<script type="text/javascript" src="https://unpkg.com/tabulator-tables@6.3.1/dist/js/tabulator.min.js"></script>
<div id="example-table"></div>

想请教大家,该怎么修复这个问题?


补充发现:这个问题在代码片段和在线代码编辑器环境里不会出现,它们的共同点是都运行在IFRAME中,看起来IFRAME不会被调整大小(或者有类似机制规避了这个问题)。

备注:内容来源于stack exchange,提问作者The One

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.14 09:43:01