Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Targeted input loses focus on android and ios devices

已关闭
#1,143 38 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
javascript

调研方向

从 src/index.js 中的 CodeSandbox 复现开始,并在实体 Android 和 iOS 设备上运行,比较有无 shepherd-element 时的行为。确认焦点丢失和键盘关闭,然后隔离所需的更改,以便目标输入框在 tour 元素仍然存在时保持焦点。

由索引模型根据 Issue 内容生成。

描述

bug

Hey, I am having a weird issue in mobile devices that I cannot figure out.

Basically I have one step that targets an input element, and it is expected that the user types something to proceed to the next step.

This works fine when trying on desktop, but on android or ios when I click the input element to start typing the input immediately loses focus. On android is very obvious that the keyboard shows for a little bit and disappears

Here's a simple codesanbox showing the issue:
https://codesandbox.io/s/silly-ritchie-o0w88?file=/src/index.js

The issue doesn't appear in the browser's responsive mode, only in the actual devices.

One thing that I noticed is that If I remove the 'shepherd-element' element from the dom it works fine. Not sure if this indicates something relevant

Thanks

主要语言
JavaScript
星标
13.8k
派生
658
平均合并
7 天 5 小时
30 天内合并 PR
18

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

shipshapecode/shepherd 的其他 Issue

查看 shipshapecode/shepherd 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。