当 DOM 失去焦点时,嵌套输入字段不会保存

发布于 2025-01-18 02:47:17 字数 172 浏览 2 评论 0原文

我有一个输入框位于深度嵌套在多个类中的“卡”上。我希望能够允许用户在输入框失去焦点时保存他们的输入,本质上允许单击卡上的其他任何位置来保存输入框的当前值。目前,仅当我完全单击卡片和卡片列表区域之外时,此行为才有效。如何才能使单击输入字段之外的任何位置都可以保存当前值?我正在使用 jQuery、Kendo 和 Typescript

I have an input box located on a "card" that is deeply nested in multiple classes. I want to be able to allow a user to save their input when the input box loses focus, essentially allowing a click anywhere else on the card to save the current value of the input box. Currently this behavior works only if I click completely outside the card and list of cards area. How can I make it so clicking anywhere outside of the input field allows for the current value to be saved? I am using jQuery, Kendo, and typescript

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文