V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐关注
Meteor
JSLint - a JavaScript code quality tool
jsFiddle
D3.js
WebStorm
推荐书目
JavaScript 权威指南第 5 版
Closure: The Definitive Guide
xiaoming1992
V2EX  ›  JavaScript

iPad input select() 方法 bug?

  •  
  •   xiaoming1992 · 2022-02-10 10:24:31 +08:00 · 1120 次点击
    这是一个创建于 798 天前的主题,其中的信息可能已经有所发展或是发生改变。
    在其他事件处理程序中调用 input.select() 方法时, 该 input 的内容会被清空. 我的设备是在 ipad air 64G, chrome 和 safari 都能复现. 见 [https://jsbin.com/soseburovu/edit?html,output]( https://jsbin.com/soseburovu/edit?html,output)

    有什么办法 hack 一下吗?
    2 条回复    2022-03-10 21:51:05 +08:00
    kwater
        1
    kwater  
       2022-03-09 17:00:19 +08:00
    模拟器和 iOS 真机无法重现,我回家也试试
    xiaoming1992
        2
    xiaoming1992  
    OP
       2022-03-10 21:51:05 +08:00
    @kwater 我已经放弃了,不 select 了。。。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3652 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 04:47 · PVG 12:47 · LAX 21:47 · JFK 00:47
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.