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

Random UI cut off issues #91

Open
nwfiam248 opened this issue Jun 8, 2022 · 0 comments
Open

Random UI cut off issues #91

nwfiam248 opened this issue Jun 8, 2022 · 0 comments

Comments

@nwfiam248
Copy link

nwfiam248 commented Jun 8, 2022

  • Accessory section cuts off at the bottom in web views randomly on both android/iOS
  • Keyboard is mostly lowered to the bottom showing the Accessory alone in random situations in iOS

The issues are random as in for input fields on the same screen, the accessory keyboard might be fine for one input field focus but not for another.
Issue Preview:

Screen.Recording.2022-06-09.at.10.28.35.mov
Screen.Recording.2022-06-09.at.10.33.38.mov

Code:

`
<WebView
ref={webViewRef}
// injectedJavaScriptBeforeContentLoaded={runFirst}
injectedJavaScriptBeforeContentLoaded={jsCode}
mixedContentMode="compatibility"
onMessage={msg => console.log(msg.nativeEvent.data)}
source={{
uri: webViewUrl,
}}
javaScriptEnabled
/>

  <KeyboardAccessoryView animateOn="all" androidAdjustResize>
    {({isKeyboardVisible}) => (
      <SafeAreaView>
        {isKeyboardVisible && (
          <ScrollView
            horizontal
            keyboardShouldPersistTaps="handled"
            showsHorizontalScrollIndicator={false}
            // contentContainerStyle={styles.scrollContainer}
          >
            {data?.map((item, index) => (
              <Button
                key={`item-${index}-${item}`}
                onPress={() => {
                  webViewRef.current.postMessage(item);
                  // setText(item);
                }}
                title={`  ${item}  `}
              />
            ))}
          </ScrollView>
        )}
      </SafeAreaView>
    )}
  </KeyboardAccessoryView>
</View>`
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

No branches or pull requests

1 participant