Skip to content

CTA within OverKeyBoardView on Android is laggy or non responsive #1404

@daniel112

Description

@daniel112

Describe the bug

NOTE: on iOS, behavior works as expected

When using OverKeyBoardView on Android, any buttons or pressable things I render are noticeably non-responsive, even though the UI is responding to the press

Versions:

  • Android 16, One UI 8.0
  • React Native 0.79.X
  • Keyboard Controller 1.21.0

Code snippet
I have a simplified example here running on my Android tablet. once the OverKeyboard button appears, tapping on the Close button does not even log out anything. Sometimes it does, most times it does not.

const PartialGoogleWebViewStory = () => {
  const [isWebViewActive, setIsWebViewActive] = useState(false);

  const handleClose = useCallback(() => {
    console.log("CLOSE")
    setIsWebViewActive(false);
  }, []);

  return (
    <View style={{ flex: 1, }}>
      <TextInput
        placeholder="Type here"
        onFocus={() => setIsWebViewActive(true)}
        style={{
          borderWidth: 1,
          borderColor: '#ccc',
          borderRadius: 8,
          paddingHorizontal: 12,
        }}
      />

      {/* <View
        style={{ height: 320, overflow: 'hidden', borderRadius: 8 }}
        onTouchStart={() => setIsWebViewActive(false)}
      >
        <WebView source={{ uri: 'https://google.com' }} style={{ flex: 1 }} />
      </View> */}

      <OverKeyboardView visible={isWebViewActive}>
        <View
          style={{
            alignItems: 'center',
            paddingHorizontal: 16,
            paddingBottom: 12,
            paddingTop: 600
          }}
        >
          <Pressable
            onPress={handleClose}
            style={({ pressed }) => ({
              backgroundColor: '#1f1f1f',
              borderRadius: 18,
              paddingHorizontal: 14,
              paddingVertical: 8,
              opacity: pressed ? 0.7 : 1,
            })}
          >
            <Text style={{ color: '#fff', fontWeight: '600' }}>Close</Text>
          </Pressable>
        </View>
      </OverKeyboardView>
    </View>
  );
};

Repo for reproducing
n/a

To Reproduce
Steps to reproduce the behavior:

  1. Click on the textInput to focus
  2. A close button should appear on the screen
  3. Tap on the button
  4. See that nothing happens, not even a log

Expected behavior
the close button should dissapear

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: Android Tablet 16, One UI 8.0
  • RN version: 0.79.7
  • RN architecture: new Arch on Android
  • JS engine: Hermes
  • Library version: 1.21.0

Additional context
on iOS the button interaction works as expected

ios-overkeyboard.mp4
android-overkeyboard.mp4

Metadata

Metadata

Assignees

Labels

OverKeyboardViewAnything related to OverKeyboardViewrepro providedIssue contains reproduction repository/code🐛 bugSomething isn't working🤖 androidAndroid specific

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions