bdbai
V2EX  ›  React

onBlur 在 iOS 上不能如预期触发?

  •  
  •   bdbai ·
    bdbai · Jan 21, 2016 via iPhone · 4471 views
    This topic created in 3788 days ago, the information mentioned may be changed or developed.
    把 onBlur 事件与元素绑定后, iOS Safari 不能正常触发。具体表现为:点击 `Delete` 按钮后按钮变色,再点击其它元素不能变回来。

    iOS 9.2

    代码仓库:
    https://coding.net/u/bdbai/p/NoteDemo-web/git

    演示地址:
    http://bdbai-notedemo-web.coding.io/

    为了练手 React 用,没有防 XSS 、 SQL 注入,各位手下留情。
    Supplement 1  ·  Jan 21, 2016

    找到问题了。触发 onBlur 事件之前必须使该元素获得焦点。
    https://coding.net/u/bdbai/p/NoteDemo-web/git/commit/dd6297c109433f2c988d1d82bf043de0d6150347
    感谢查看过的各位。

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3875 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 43ms · UTC 00:09 · PVG 08:09 · LAX 17:09 · JFK 20:09
    ♥ Do have faith in what you're doing.