Weird Hint behavior on Android

未关闭
#3,913 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
冷清
技术栈
react-native, typescript
领域
mobile

调研方向

首先,使用提供的代码片段以及列出的 React Native 和 React Native UI Lib 版本,在 Android 上复现 Hint 组件的行为。调查可见性切换和按下状态行为;当被包装的组件不再发生位移,并且切换可见性不会产生缺少视图的可访问性错误时,即表示完成。

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

描述

bug

Description

On Android, the component wrapped by Hint shifts position when pressed. And then, when visibility is set back to false, an error like the below is thrown:

sendAccessibilityEvent() dropping event: Cannot find view with tag #8446

Related to
  • Components
  • Demo
  • Docs
  • Typings
Steps to reproduce

Steps to reproduce the behavior:

  1. Use the Hint component on Android and observe the behavior when toggling visibility of the hint's contents.

More Info

Code snippet
        <Hint
          visible={hintVisible}
          color="white"
          enableShadow
          offset={6}
          borderRadius={8}
          containerWidth={400}
          removePaddings
          onBackgroundPress={() => setHintVisible(!hintVisible)}
          customContent={
            <Text className="text-xs text-center p-2.5 px-5">
              Your ability to submit bids, update membership, and accept offers has been disabled.
              Where applicable, all your max bids have been lowered to current bids. Please contact
              Customer Support:{' '}
              <STText classes="color-[#6CA5C8]" onPress={openSubmitRequest}>
                submit a request
              </STText>
              .
            </Text>
          }
        >
          <Pressable
            accessibilityRole="button"
            accessibilityLabel="info"
            accessibilityHint="opens dialog explaining account suspension"
            onPress={() => setHintVisible(!hintVisible)}
          >
            <FontAwesomeIcon icon={faCircleInfo} size={18} color={'white'} />
          </Pressable>
        </Hint>
Screenshots/Video

https://github.com/user-attachments/assets/1996adf7-2a87-4256-8e3f-d6a74e062383

Environment
  • React Native version: 0.81.5
  • React Native UI Lib version: 8.2.1
Affected platforms
  • Android
  • iOS
  • Web
主要语言
TypeScript
星标
7.2k
派生
749
平均合并
29 分钟
30 天内合并 PR
1

环境准备

从这里开始

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

wix/react-native-ui-lib 的其他 Issue

查看 wix/react-native-ui-lib 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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