software-mansion / software-mansion/react-native-enriched-html

[Bug] onBlur not called as expected

Open
#184 1 comment 2 reactions 1 assignee View on GitHub

@exploIF is already working on this.

Since Oct 14, 2025.

bug
Dominant language
C
Stars
1.4k
Forks
66
Avg merge
4d 19h
Merged PRs (30d)
11

Description

Describe the bug
onBlur doesn't work when tapping on ScrollView which prevents keyboard from being dismissed

To Reproduce
Default TextInput component works:

export default function Page() {
  const insets = useSafeAreaInsets();

  return (
    <View style={{ flex: 1 }}>
      <ScrollView>
        <View style={{ flex: 1 }} />
      </ScrollView>
      <View style={{ paddingBottom: insets.bottom }}>
        <TextInput
          placeholder="Enter your message"
          onBlur={() => {
            console.log('onBlur'); // fires as expected
          }}
        />
      </View>
    </View>
  );
}

EnrichedTextInput does not work:

export default function Page() {
  const insets = useSafeAreaInsets();

  return (
    <View style={{ flex: 1 }}>
      <ScrollView>
        <View style={{ flex: 1 }} />
      </ScrollView>
      <View style={{ paddingBottom: insets.bottom }}>
        <EnrichedTextInput
          placeholder="Enter your message"
          onBlur={() => {
            console.log('onBlur'); // never fires
          }}
        />
      </View>
    </View>
  );
}

Expected behavior
It should behave the same as TextInput so that integrating with ScrollView works as expected

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

Device (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.