我可以让我的网站的内容可编辑区域对安卓股票浏览器上的触摸事件更敏感吗

can I make the contenteditable area of my site more sensitive to touch events on android stock browsers?

本文关键字:浏览器 触摸 事件 网站 我的 区域 编辑 我可以      更新时间:2023-09-26

我发现在android股票浏览器上关注和编辑内容可编辑区域并不容易。

例如,在下面的链接上http://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_global_contenteditable

如果我集中注意力和不集中注意力,并想再次集中注意力,我需要触摸并按住该区域一秒钟以上,以启动键盘。相比之下,在安卓版Chrome上,它要好得多,我只需要触摸一下,它就会集中注意力。

在Javascript/jQuery/中有没有任何方法可以使该区域更具响应性。

因为有时人们只是试图触摸它,但键盘没有出现,所以他们不知道该区域是可编辑的。

非常感谢!

最后我使用了这个:

$('div').on('click', "div[contenteditable='true']", function(e) {                   
            e.stopPropagation();
            if ($(this).is(":focus")) {
                //
            } else {
                $(this).focus();
            }
        });