Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FloatingButton - Not pressable when wrapped with Keyboard.KeyboardTrackingView. #3496

Merged
merged 3 commits into from
Feb 3, 2025

Conversation

nitzanyiz
Copy link
Collaborator

@nitzanyiz nitzanyiz commented Feb 3, 2025

Description

When the FloatingButton is rendered inside the Keyboard.KeyboardTrackingView its not pressable. Removing the absoluteFillObject from the containing view style seems to solve this.
ran it with a snapshot version in private. All test are passing but there is a chunk below the the button for some reason. Is also happens with a different component so its probably not related whats inside that view.

Changelog

FloatingButton - Fixed not pressable when wrapped with Keyboard.KeyboardTrackingView.

Additional info

Snippet to reproduce:

import React, {useRef} from 'react';
import {View, TextField, Button, Keyboard, FloatingButton} from 'react-native-ui-lib';

const PlaygroundScreen = () => {
  const textInput = useRef<any>(null);

  return (
    <View bg-grey80 flex>
      <TextField
        label="Enter Text"
        placeholder="Type here..."
        ref={textInput}
      />
      <Button label="Blur TextField" onPress={() => textInput.current?.blur()}/>
      <View bottom flex>
        <Keyboard.KeyboardTrackingView>
          <FloatingButton
            button={{
              label: 'Button'
            }}
            visible
          />
        </Keyboard.KeyboardTrackingView>
      </View>
    </View>
  );
};

export default PlaygroundScreen;

@nitzanyiz nitzanyiz marked this pull request as ready for review February 3, 2025 14:40
@nitzanyiz nitzanyiz merged commit 4f22fa5 into master Feb 3, 2025
1 check passed
@nitzanyiz nitzanyiz deleted the fix/floatingButtonWithKeyboard branch February 3, 2025 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants